Assume square images as posters

dimensional_asset_rename
pull/692/head
aljohn92 3 years ago committed by GitHub
parent 6d442397b5
commit 683cf22ffe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -898,7 +898,7 @@ class Plex(Library):
image = Image.open(file)
_w, _h = image.size
image.close()
if not poster and _h > _w:
if not poster and _h >= _w:
new_path = os.path.join(os.path.dirname(file), f"poster{os.path.splitext(file)[1].lower()}")
os.rename(file, new_path)
poster = ImageData("asset_directory", os.path.abspath(new_path), prefix=f"{item.title}'s ", is_url=False)

Loading…
Cancel
Save