mirror of
https://github.com/meisnate12/Plex-Meta-Manager
synced 2024-11-10 06:54:21 +00:00
overlay fix
This commit is contained in:
parent
67e599c20b
commit
c8394e4bdb
1 changed files with 9 additions and 5 deletions
|
@ -403,14 +403,16 @@ class Plex:
|
|||
self.reload(item)
|
||||
|
||||
def upload_images(self, item, poster=None, background=None, overlay=None):
|
||||
image = None
|
||||
image_compare = None
|
||||
poster_uploaded = False
|
||||
if self.config.Cache:
|
||||
image, image_compare, _ = self.config.Cache.query_image_map(item.ratingKey, self.image_table_name)
|
||||
|
||||
if poster is not None:
|
||||
try:
|
||||
image = None
|
||||
if self.config.Cache:
|
||||
image, image_compare, _ = self.config.Cache.query_image_map(item.ratingKey, self.image_table_name)
|
||||
if str(poster.compare) != str(image_compare):
|
||||
image = None
|
||||
if image_compare and str(poster.compare) != str(image_compare):
|
||||
image = None
|
||||
if image is None or image != item.thumb:
|
||||
self._upload_image(item, poster)
|
||||
poster_uploaded = True
|
||||
|
@ -427,6 +429,8 @@ class Plex:
|
|||
image_overlay = None
|
||||
if self.config.Cache:
|
||||
_, _, image_overlay = self.config.Cache.query_image_map(item.ratingKey, self.image_table_name)
|
||||
if image is None or image != item.thumb:
|
||||
image_overlay = None
|
||||
if poster_uploaded or not image_overlay or image_overlay != overlay_name:
|
||||
if not item.posterUrl:
|
||||
raise Failed(f"Overlay Error: No existing poster to Overlay for {item.title}")
|
||||
|
|
Loading…
Reference in a new issue