mirror of
https://github.com/meisnate12/Plex-Meta-Manager
synced 2025-02-16 22:08:25 +00:00
Merge pull request #692 from aljohn92/patch-1
Assume square images as posters
This commit is contained in:
commit
a9a93a582b
1 changed files with 1 additions and 1 deletions
|
@ -902,7 +902,7 @@ class Plex(Library):
|
||||||
image = Image.open(file)
|
image = Image.open(file)
|
||||||
_w, _h = image.size
|
_w, _h = image.size
|
||||||
image.close()
|
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()}")
|
new_path = os.path.join(os.path.dirname(file), f"poster{os.path.splitext(file)[1].lower()}")
|
||||||
os.rename(file, new_path)
|
os.rename(file, new_path)
|
||||||
poster = ImageData("asset_directory", os.path.abspath(new_path), prefix=f"{item.title}'s ", is_url=False)
|
poster = ImageData("asset_directory", os.path.abspath(new_path), prefix=f"{item.title}'s ", is_url=False)
|
||||||
|
|
Loading…
Add table
Reference in a new issue