[9] fix overlays being off center

This commit is contained in:
meisnate12 2022-07-05 14:12:31 -04:00
parent e392f007cd
commit 95ea04aa3a
3 changed files with 4 additions and 2 deletions

View file

@ -1 +1 @@
1.17.1-develop8
1.17.1-develop9

View file

@ -268,7 +268,7 @@ class Overlays:
self.library.reload(item, force=True)
poster_compare = poster.compare if poster else item.thumb
logger.info(f"{item_title[:60]:<60} | Overlays Applied: {', '.join(over_names)}")
except (OSError, BadRequest) as e:
except (OSError, BadRequest, SyntaxError) as e:
logger.stacktrace()
raise Failed(f"{item_title[:60]:<60} | Overlay Error: {e}")
elif self.library.show_asset_not_needed:

View file

@ -1149,9 +1149,11 @@ class Overlay:
if self.back_box:
if self.back_align == "left":
main_x = start_x
main_y = start_y + (back_height - box_height) // 2
elif self.back_align == "right":
main_x = start_x + back_width - (text_width if text is not None else image_width)
elif self.back_align == "top":
main_x = start_x + (back_width - box_width) // 2
main_y = start_y
elif self.back_align == "bottom":
main_y = start_y + back_height - (text_height if text is not None else image_height)