Skip to content

Commit ba4a744

Browse files
committed
Fix radarr
closes #128
1 parent 6248069 commit ba4a744

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

connections/radarr.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,16 @@ func (r *Radarr) MatchPath(path string) bool {
5555
func (r *Radarr) RemoveFile(path string) bool {
5656
var movieID int64
5757
var movieIDs []int64
58-
movieList, _ := r.server.GetMovie(0)
58+
data := radarr.GetMovie{TMDBID: 0}
59+
movieList, _ := r.server.GetMovie(&data)
5960
for _, movie := range movieList {
6061
if strings.Contains(r.translatePath(path), movie.Path) {
6162
movieID = movie.ID
6263
movieIDs = append(movieIDs, movieID)
63-
edit := radarr.BulkEdit{MovieIDs: []int64{movie.MovieFile.MovieID}, DeleteFiles: starr.True()}
64-
r.server.EditMovies(&edit)
64+
err := r.server.DeleteMovieFiles(movie.MovieFile.MovieID)
65+
if err != nil {
66+
//handle the error
67+
}
6568
r.server.SendCommand(&radarr.CommandRequest{Name: "RefreshMovie", MovieIDs: movieIDs})
6669
r.server.SendCommand(&radarr.CommandRequest{Name: "MoviesSearch", MovieIDs: movieIDs})
6770
return true

0 commit comments

Comments
 (0)