fix(api): cleanup radarr bits in sonarr api (#2035)

This commit is contained in:
salty
2025-10-12 17:19:51 +02:00
committed by GitHub
parent 34fcc5d2c7
commit a8c7e35f56
2 changed files with 5 additions and 5 deletions

View File

@@ -257,7 +257,7 @@ class SonarrAPI extends ServarrBase<{
series: createdSeriesResponse.data,
});
} else {
logger.error('Failed to add movie to Sonarr', {
logger.error('Failed to add series to Sonarr', {
label: 'Sonarr',
options,
});
@@ -342,7 +342,7 @@ class SonarrAPI extends ServarrBase<{
return newSeasons;
}
public removeSerie = async (serieId: number): Promise<void> => {
public removeSeries = async (serieId: number): Promise<void> => {
try {
const { id, title } = await this.getSeriesByTvdbId(serieId);
await this.axios.delete(`/series/${id}`, {
@@ -351,9 +351,9 @@ class SonarrAPI extends ServarrBase<{
addImportExclusion: false,
},
});
logger.info(`[Radarr] Removed serie ${title}`);
logger.info(`[Sonarr] Removed series ${title}`);
} catch (e) {
throw new Error(`[Radarr] Failed to remove serie: ${e.message}`);
throw new Error(`[Sonarr] Failed to remove series: ${e.message}`);
}
};

View File

@@ -271,7 +271,7 @@ mediaRoutes.delete(
if (!tvdbId) {
throw new Error('TVDB ID not found');
}
await (service as SonarrAPI).removeSerie(tvdbId);
await (service as SonarrAPI).removeSeries(tvdbId);
}
return res.status(204).send();