[116] fix for allowed_libraries

This commit is contained in:
meisnate12 2022-05-25 11:21:15 -04:00
parent aac45e9bf9
commit e92690b05c
3 changed files with 5 additions and 11 deletions

View file

@ -1 +1 @@
1.16.5-develop115 1.16.5-develop116

View file

@ -227,10 +227,10 @@ class CollectionBuilder:
for library_type in util.get_list(self.data[methods["allowed_library_types"]], lower=True): 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: if library_type == "true" or library_type == self.library.Plex.type:
found_type = True 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": elif library_type == "false":
raise NotScheduled(f"Skipped because allowed_library_types is 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: 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}") raise NotScheduled(f"Skipped because allowed_library_types {self.data[methods['allowed_library_types']]} doesn't match the library type: {self.library.Plex.type}")

View file

@ -884,7 +884,7 @@ class Overlay:
raise Failed(error) raise Failed(error)
if self.horizontal_align != "center" and not per and x_off < 0: if self.horizontal_align != "center" and not per and x_off < 0:
raise Failed(f"{error} 0 or greater") 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%") raise Failed(f"{error} between 0% and 100%")
elif self.horizontal_align == "center" and per and (x_off > 50 or x_off < -50): elif self.horizontal_align == "center" and per and (x_off > 50 or x_off < -50):
raise Failed(f"{error} between -50% and 50%") raise Failed(f"{error} between -50% and 50%")
@ -905,7 +905,7 @@ class Overlay:
raise Failed(error) raise Failed(error)
if self.vertical_align != "center" and not per and y_off < 0: if self.vertical_align != "center" and not per and y_off < 0:
raise Failed(f"{error} 0 or greater") 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%") raise Failed(f"{error} between 0% and 100%")
elif self.vertical_align == "center" and per and (y_off > 50 or y_off < -50): elif self.vertical_align == "center" and per and (y_off > 50 or y_off < -50):
raise Failed(f"{error} between -50% and 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 ["", "%"]]: 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.image = self.get_text_overlay(text, 1000, 1500)
self.landscape = self.get_text_overlay(text, 1920, 1080) self.landscape = self.get_text_overlay(text, 1920, 1080)
else: else:
if "|" in self.name: if "|" in self.name:
raise Failed(f"Overlay Error: Overlay Name: {self.name} cannot contain '|'") raise Failed(f"Overlay Error: Overlay Name: {self.name} cannot contain '|'")