feat: List and delete local files

This commit is contained in:
Aleksi Lassila
2024-04-01 18:44:05 +03:00
parent 0193451f32
commit 8a6cfc0669
13 changed files with 134 additions and 21 deletions

View File

@@ -132,6 +132,16 @@ export class RadarrApi implements Api<paths> {
})
.then((res) => res.response.ok) || Promise.resolve(false);
getMovieFilesByMovieId = (movieId: number): Promise<MovieFileResource[]> =>
this.getClient()
?.GET('/api/v3/moviefile', {
params: {
query: {
movieId
}
}
})
.then((r) => r.data || []) || Promise.resolve([]);
deleteRadarrMovieFile = (id: number) =>
this.getClient()
?.DELETE('/api/v3/moviefile/{id}', {