From dc0f0df92f398d00451253b863021c4899d4060a Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Wed, 6 Sep 2023 00:09:10 +0200 Subject: [PATCH] Lint the scanner --- scanner/providers/types/movie.py | 1 + scanner/providers/types/show.py | 1 + scanner/providers/utils.py | 3 ++- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/scanner/providers/types/movie.py b/scanner/providers/types/movie.py index 83226442..11117993 100644 --- a/scanner/providers/types/movie.py +++ b/scanner/providers/types/movie.py @@ -45,6 +45,7 @@ class Movie: def to_kyoo(self): from ..utils import select_image + # For now, the API of kyoo only support one language so we remove the others. default_language = os.environ["LIBRARY_LANGUAGES"].split(",")[0] return { diff --git a/scanner/providers/types/show.py b/scanner/providers/types/show.py index 6b874adc..ffcab520 100644 --- a/scanner/providers/types/show.py +++ b/scanner/providers/types/show.py @@ -48,6 +48,7 @@ class Show: def to_kyoo(self): from providers.utils import select_image + # For now, the API of kyoo only support one language so we remove the others. default_language = os.environ["LIBRARY_LANGUAGES"].split(",")[0] return { diff --git a/scanner/providers/utils.py b/scanner/providers/utils.py index aff2854d..1024de92 100644 --- a/scanner/providers/utils.py +++ b/scanner/providers/utils.py @@ -17,7 +17,8 @@ def format_date(date: date | int | None) -> str | None: def select_image( - self: Movie | Show, type: Literal["posters"] | Literal["thumbnails"] | Literal["logos"] + self: Movie | Show, + type: Literal["posters"] | Literal["thumbnails"] | Literal["logos"], ) -> str | None: # For now, the API of kyoo only support one language so we remove the others. default_language = os.environ["LIBRARY_LANGUAGES"].split(",")[0]