[99] has_coordinates fix

This commit is contained in:
meisnate12 2022-05-15 23:08:14 -04:00
parent b5c31ec2a2
commit d880cc4840
3 changed files with 6 additions and 3 deletions

View file

@ -1 +1 @@
1.16.5-develop98 1.16.5-develop99

View file

@ -69,6 +69,9 @@ class Operations:
for k, v in self.library.anidb_map.items(): for k, v in self.library.anidb_map.items():
reverse_anidb[v] = k reverse_anidb[v] = k
if self.library.assets_for_all and not self.library.asset_directory:
logger.error("Asset Error: No Asset Directory for Assets For All")
for i, item in enumerate(items, 1): for i, item in enumerate(items, 1):
try: try:
item = self.library.reload(item) item = self.library.reload(item)
@ -78,7 +81,7 @@ class Operations:
logger.ghost(f"Processing: {i}/{len(items)} {item.title}") logger.ghost(f"Processing: {i}/{len(items)} {item.title}")
current_labels = [la.tag for la in item.labels] if self.library.assets_for_all or self.library.mass_imdb_parental_labels else [] current_labels = [la.tag for la in item.labels] if self.library.assets_for_all or self.library.mass_imdb_parental_labels else []
if self.library.assets_for_all and "Overlay" not in current_labels: if self.library.assets_for_all and self.library.asset_directory and "Overlay" not in current_labels:
try: try:
poster, background, item_dir, name = self.library.find_item_assets(item) poster, background, item_dir, name = self.library.find_item_assets(item)
if poster or background: if poster or background:

View file

@ -1008,7 +1008,7 @@ class Overlay:
return output return output
def has_coordinates(self): def has_coordinates(self):
return self.horizontal_offset is None or self.vertical_offset is None return self.horizontal_offset is not None and self.vertical_offset is not None
def get_coordinates(self, image_width, image_height, text=None): def get_coordinates(self, image_width, image_height, text=None):
if not self.has_coordinates(): if not self.has_coordinates():