diff --git a/modules/builder.py b/modules/builder.py index 934a66a4..92ad48b1 100644 --- a/modules/builder.py +++ b/modules/builder.py @@ -1,7 +1,7 @@ import logging, os, re from datetime import datetime, timedelta from modules import anidb, anilist, icheckmovies, imdb, letterboxd, mal, plex, radarr, sonarr, stevenlu, tautulli, tmdb, trakt, tvdb, util -from modules.util import Failed, ImageData +from modules.util import Failed, ImageData, NotScheduled from PIL import Image from plexapi.exceptions import BadRequest, NotFound from plexapi.video import Movie, Show, Season, Episode @@ -391,7 +391,7 @@ class CollectionBuilder: if len(self.schedule) == 0: skip_collection = False if skip_collection: - raise Failed(f"{self.schedule}\n\nCollection {self.name} not scheduled to run") + raise NotScheduled(f"{self.schedule}\n\nCollection {self.name} not scheduled to run") self.collectionless = "plex_collectionless" in methods diff --git a/modules/util.py b/modules/util.py index 4fab89d5..a307b0d0 100644 --- a/modules/util.py +++ b/modules/util.py @@ -19,6 +19,9 @@ class TimeoutExpired(Exception): class Failed(Exception): pass +class NotScheduled(Exception): + pass + class ImageData: def __init__(self, attribute, location, prefix="", is_poster=True, is_url=True): self.attribute = attribute diff --git a/plex_meta_manager.py b/plex_meta_manager.py index faf6d0d7..451a416d 100644 --- a/plex_meta_manager.py +++ b/plex_meta_manager.py @@ -6,7 +6,7 @@ try: from modules import util from modules.builder import CollectionBuilder from modules.config import Config - from modules.util import Failed + from modules.util import Failed, NotScheduled except ModuleNotFoundError: print("Requirements Error: Requirements are not installed") sys.exit(0) @@ -572,6 +572,9 @@ def run_collection(config, library, metadata, requested_collections): if builder.run_again and (len(builder.run_again_movies) > 0 or len(builder.run_again_shows) > 0): library.run_again.append(builder) + + except NotScheduled as e: + util.print_multiline(e, info=True) except Failed as e: library.notify(e, collection=mapping_name) util.print_stacktrace()