mirror of
https://github.com/meisnate12/Plex-Meta-Manager
synced 2024-11-26 06:20:23 +00:00
fix overlay and icheckmovies issue
This commit is contained in:
parent
ddc456da2c
commit
7f1593ecd8
3 changed files with 5 additions and 4 deletions
|
@ -1561,7 +1561,7 @@ class CollectionBuilder:
|
||||||
if self.config.Cache:
|
if self.config.Cache:
|
||||||
rating_keys = self.config.Cache.query_image_map_overlay(self.library.image_table_name, overlay_name)
|
rating_keys = self.config.Cache.query_image_map_overlay(self.library.image_table_name, overlay_name)
|
||||||
overlay_folder = os.path.join(self.config.default_dir, "overlays", overlay_name)
|
overlay_folder = os.path.join(self.config.default_dir, "overlays", overlay_name)
|
||||||
overlay_image = Image.open(os.path.join(overlay_folder, "overlay.png"))
|
overlay_image = Image.open(os.path.join(overlay_folder, "overlay.png")).convert("RGBA")
|
||||||
temp_image = os.path.join(overlay_folder, f"temp.png")
|
temp_image = os.path.join(overlay_folder, f"temp.png")
|
||||||
overlay = (overlay_name, overlay_folder, overlay_image, temp_image)
|
overlay = (overlay_name, overlay_folder, overlay_image, temp_image)
|
||||||
|
|
||||||
|
|
|
@ -28,9 +28,10 @@ class ICheckMovies:
|
||||||
list_url = icheckmovies_list.strip()
|
list_url = icheckmovies_list.strip()
|
||||||
if not list_url.startswith(base_url):
|
if not list_url.startswith(base_url):
|
||||||
raise Failed(f"ICheckMovies Error: {list_url} must begin with: {base_url}")
|
raise Failed(f"ICheckMovies Error: {list_url} must begin with: {base_url}")
|
||||||
if len(self._parse_list(list_url, language)) > 0:
|
elif len(self._parse_list(list_url, language)) > 0:
|
||||||
valid_lists.append(list_url)
|
valid_lists.append(list_url)
|
||||||
raise Failed(f"ICheckMovies Error: {list_url} failed to parse")
|
else:
|
||||||
|
raise Failed(f"ICheckMovies Error: {list_url} failed to parse")
|
||||||
return valid_lists
|
return valid_lists
|
||||||
|
|
||||||
def get_items(self, method, data, language):
|
def get_items(self, method, data, language):
|
||||||
|
|
|
@ -420,7 +420,7 @@ class Plex:
|
||||||
shutil.copyfile(temp_image, os.path.join(overlay_folder, f"{item.ratingKey}.png"))
|
shutil.copyfile(temp_image, os.path.join(overlay_folder, f"{item.ratingKey}.png"))
|
||||||
while util.is_locked(temp_image):
|
while util.is_locked(temp_image):
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
new_poster = Image.open(temp_image)
|
new_poster = Image.open(temp_image).convert("RGBA")
|
||||||
new_poster = new_poster.resize(overlay_image.size, Image.ANTIALIAS)
|
new_poster = new_poster.resize(overlay_image.size, Image.ANTIALIAS)
|
||||||
new_poster.paste(overlay_image, (0, 0), overlay_image)
|
new_poster.paste(overlay_image, (0, 0), overlay_image)
|
||||||
new_poster.save(temp_image)
|
new_poster.save(temp_image)
|
||||||
|
|
Loading…
Reference in a new issue