File tree Expand file tree Collapse file tree 2 files changed +17
-7
lines changed
Expand file tree Collapse file tree 2 files changed +17
-7
lines changed Original file line number Diff line number Diff line change @@ -618,6 +618,22 @@ class BaseScanner<T> {
618618 get protectedBundleSize ( ) : number {
619619 return this . bundleSize ;
620620 }
621+
622+ protected async processUnmonitoredMovie ( tmdbId : number ) : Promise < void > {
623+ const mediaRepository = getRepository ( Media ) ;
624+ await this . asyncLock . dispatch ( tmdbId , async ( ) => {
625+ const existing = await this . getExisting ( tmdbId , MediaType . MOVIE ) ;
626+ // For some reason the status of missing movies isn't PENDING but PROCESSING
627+ if ( existing && existing . status === MediaStatus . PROCESSING ) {
628+ existing . status = MediaStatus . UNKNOWN ;
629+ await mediaRepository . save ( existing ) ;
630+ this . log (
631+ `Movie TMDB ID ${ tmdbId } unmonitored from Radarr. Media status set to UNKNOWN.` ,
632+ 'info'
633+ ) ;
634+ }
635+ } ) ;
636+ }
621637}
622638
623639export default BaseScanner ;
Original file line number Diff line number Diff line change @@ -80,13 +80,7 @@ class RadarrScanner
8080
8181 private async processRadarrMovie ( radarrMovie : RadarrMovie ) : Promise < void > {
8282 if ( ! radarrMovie . monitored && ! radarrMovie . hasFile ) {
83- this . log (
84- 'Title is unmonitored and has not been downloaded. Skipping item.' ,
85- 'debug' ,
86- {
87- title : radarrMovie . title ,
88- }
89- ) ;
83+ this . processUnmonitoredMovie ( radarrMovie . tmdbId ) ;
9084 return ;
9185 }
9286
You can’t perform that action at this time.
0 commit comments