Merge pull request #692 from aljohn92/patch-1

Assume square images as posters
This commit is contained in:
meisnate12 2022-02-07 10:06:05 -05:00 committed by GitHub
commit a9a93a582b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -902,7 +902,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)