From e92690b05ca4ecd5cf92ce036007fdfe758cfb86 Mon Sep 17 00:00:00 2001 From: meisnate12 Date: Wed, 25 May 2022 11:21:15 -0400 Subject: [PATCH] [116] fix for allowed_libraries --- VERSION | 2 +- modules/builder.py | 4 ++-- modules/util.py | 10 ++-------- 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/VERSION b/VERSION index 8b50f582..a9c2c092 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.16.5-develop115 +1.16.5-develop116 diff --git a/modules/builder.py b/modules/builder.py index 22398dd4..60465d40 100644 --- a/modules/builder.py +++ b/modules/builder.py @@ -227,10 +227,10 @@ class CollectionBuilder: for library_type in util.get_list(self.data[methods["allowed_library_types"]], lower=True): if library_type == "true" or library_type == self.library.Plex.type: found_type = True - elif library_type not in plex.library_types: - raise Failed(f"{self.Type} Error: {library_type} is invalid. Options: {', '.join(plex.library_types)}") elif library_type == "false": raise NotScheduled(f"Skipped because allowed_library_types is false") + elif library_type not in plex.library_types: + raise Failed(f"{self.Type} Error: {library_type} is invalid. Options: {', '.join(plex.library_types)}") if not found_type: raise NotScheduled(f"Skipped because allowed_library_types {self.data[methods['allowed_library_types']]} doesn't match the library type: {self.library.Plex.type}") diff --git a/modules/util.py b/modules/util.py index b6b1072c..6f80de11 100644 --- a/modules/util.py +++ b/modules/util.py @@ -884,7 +884,7 @@ class Overlay: raise Failed(error) if self.horizontal_align != "center" and not per and x_off < 0: raise Failed(f"{error} 0 or greater") - elif self.horizontal_align != "center" and per and x_off > 100: + elif self.horizontal_align != "center" and per and (x_off > 100 or x_off < 0): raise Failed(f"{error} between 0% and 100%") elif self.horizontal_align == "center" and per and (x_off > 50 or x_off < -50): raise Failed(f"{error} between -50% and 50%") @@ -905,7 +905,7 @@ class Overlay: raise Failed(error) if self.vertical_align != "center" and not per and y_off < 0: raise Failed(f"{error} 0 or greater") - elif self.vertical_align != "center" and per and y_off > 100: + elif self.vertical_align != "center" and per and (y_off > 100 or y_off < 0): raise Failed(f"{error} between 0% and 100%") elif self.vertical_align == "center" and per and (y_off > 50 or y_off < -50): raise Failed(f"{error} between -50% and 50%") @@ -998,12 +998,6 @@ class Overlay: if text not in [f"{a}{s}" for a in ["audience_rating", "critic_rating", "user_rating"] for s in ["", "%"]]: self.image = self.get_text_overlay(text, 1000, 1500) self.landscape = self.get_text_overlay(text, 1920, 1080) - - - - - - else: if "|" in self.name: raise Failed(f"Overlay Error: Overlay Name: {self.name} cannot contain '|'")