format files

This commit is contained in:
maxDorninger
2025-06-24 19:32:21 +02:00
parent c2f89d9a90
commit 02807af6e9
14 changed files with 63 additions and 80 deletions

View File

@@ -6,6 +6,7 @@ import pillow_avif
pillow_avif
def get_year_from_date(first_air_date: str | None) -> int | None:
if first_air_date:
return int(first_air_date.split("-")[0])
@@ -13,7 +14,7 @@ def get_year_from_date(first_air_date: str | None) -> int | None:
return None
def download_poster_image(storage_path=None, poster_url=None, id: UUID=None) -> bool:
def download_poster_image(storage_path=None, poster_url=None, id: UUID = None) -> bool:
res = requests.get(poster_url, stream=True)
if res.status_code == 200:
image_file_path = storage_path.joinpath(str(id))