Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(collection handling): Ensure media not found in Starr apps is sti… #812

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 22 additions & 8 deletions server/src/modules/collections/collection-worker.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,13 +190,20 @@ export class CollectionWorkerService extends TaskBase {
break;
}
} else {
this.infoLogger(
`Couldn't find movie with tmdbid ${tmdbid} in Radarr. No action taken for movie with Plex ID: ${media.plexId}`,
);
if (collection.arrAction !== ServarrAction.UNMONITOR) {
this.plexApi.deleteMediaFromDisk(media.plexId.toString());
this.infoLogger(
`Couldn't find movie with tmdb id ${tmdbid} in Radarr, so no Radarr action was taken for movie with Plex ID ${media.plexId}. But the movie was removed from the filesystem`,
);
} else {
this.infoLogger(
`Radarr unmonitor action was not possible, couldn't find movie with tmdb id ${tmdbid} in Radarr. No action was taken for movie with Plex ID ${media.plexId}`,
);
}
}
} else {
this.infoLogger(
`Couldn't find correct tmdbid. No action taken for movie with Plex ID: ${media.plexId}`,
`Couldn't find correct tmdb id. No action taken for movie with Plex ID: ${media.plexId}. Please check this movie manually`,
);
}
}
Expand Down Expand Up @@ -393,13 +400,20 @@ export class CollectionWorkerService extends TaskBase {
break;
}
} else {
this.infoLogger(
`Couldn't find correct tvdbid. No action taken for show: https://www.themoviedb.org/tv/${media.tmdbId}`,
);
if (collection.arrAction !== ServarrAction.UNMONITOR) {
this.plexApi.deleteMediaFromDisk(plexData.ratingKey);
this.infoLogger(
`Couldn't find correct tvdb id. No Sonarr action was taken for show: https://www.themoviedb.org/tv/${media.tmdbId}. But media item was removed from Plex`,
);
} else {
this.infoLogger(
`Couldn't find correct tvdb id. No unmonitor action was taken for show: https://www.themoviedb.org/tv/${media.tmdbId}`,
);
}
}
} else {
this.infoLogger(
`Couldn't find correct tvdbid. No action taken for show: https://www.themoviedb.org/tv/${media.tmdbId}`,
`Couldn't find correct tvdb id. No action was taken for show: https://www.themoviedb.org/tv/${media.tmdbId}. Please check this show manually`,
);
}
}
Expand Down
Loading