fix(api): cleanup radarr bits in sonarr api (#2035)
This commit is contained in:
@@ -257,7 +257,7 @@ class SonarrAPI extends ServarrBase<{
|
|||||||
series: createdSeriesResponse.data,
|
series: createdSeriesResponse.data,
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
logger.error('Failed to add movie to Sonarr', {
|
logger.error('Failed to add series to Sonarr', {
|
||||||
label: 'Sonarr',
|
label: 'Sonarr',
|
||||||
options,
|
options,
|
||||||
});
|
});
|
||||||
@@ -342,7 +342,7 @@ class SonarrAPI extends ServarrBase<{
|
|||||||
|
|
||||||
return newSeasons;
|
return newSeasons;
|
||||||
}
|
}
|
||||||
public removeSerie = async (serieId: number): Promise<void> => {
|
public removeSeries = async (serieId: number): Promise<void> => {
|
||||||
try {
|
try {
|
||||||
const { id, title } = await this.getSeriesByTvdbId(serieId);
|
const { id, title } = await this.getSeriesByTvdbId(serieId);
|
||||||
await this.axios.delete(`/series/${id}`, {
|
await this.axios.delete(`/series/${id}`, {
|
||||||
@@ -351,9 +351,9 @@ class SonarrAPI extends ServarrBase<{
|
|||||||
addImportExclusion: false,
|
addImportExclusion: false,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
logger.info(`[Radarr] Removed serie ${title}`);
|
logger.info(`[Sonarr] Removed series ${title}`);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
throw new Error(`[Radarr] Failed to remove serie: ${e.message}`);
|
throw new Error(`[Sonarr] Failed to remove series: ${e.message}`);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -271,7 +271,7 @@ mediaRoutes.delete(
|
|||||||
if (!tvdbId) {
|
if (!tvdbId) {
|
||||||
throw new Error('TVDB ID not found');
|
throw new Error('TVDB ID not found');
|
||||||
}
|
}
|
||||||
await (service as SonarrAPI).removeSerie(tvdbId);
|
await (service as SonarrAPI).removeSeries(tvdbId);
|
||||||
}
|
}
|
||||||
|
|
||||||
return res.status(204).send();
|
return res.status(204).send();
|
||||||
|
|||||||
Reference in New Issue
Block a user