mirror of
https://github.com/maxdorninger/MediaManager.git
synced 2026-02-20 07:59:50 -05:00
Fix suffix formatting for with_suffix call (#408)
Fixes issue ValueError: Invalid suffix 'jpg' Completely prevents downloading posters from metadata provider
This commit is contained in:
@@ -15,7 +15,7 @@ def download_poster_image(storage_path: Path, poster_url: str, uuid: UUID) -> bo
|
|||||||
res = requests.get(poster_url, stream=True, timeout=60)
|
res = requests.get(poster_url, stream=True, timeout=60)
|
||||||
|
|
||||||
if res.status_code == 200:
|
if res.status_code == 200:
|
||||||
image_file_path = storage_path.joinpath(str(uuid)).with_suffix("jpg")
|
image_file_path = storage_path.joinpath(str(uuid)).with_suffix(".jpg")
|
||||||
image_file_path.write_bytes(res.content)
|
image_file_path.write_bytes(res.content)
|
||||||
|
|
||||||
original_image = Image.open(image_file_path)
|
original_image = Image.open(image_file_path)
|
||||||
|
|||||||
Reference in New Issue
Block a user