[9] fix overlays being off center

pull/960/head
meisnate12 3 years ago
parent e392f007cd
commit 95ea04aa3a

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

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

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

Loading…
Cancel
Save