add ability to update show's metadata and extract the poster image download logic into a separate function

This commit is contained in:
maxDorninger
2025-06-09 12:14:21 +02:00
parent b86f4371b1
commit 406ae044cb
6 changed files with 352 additions and 26 deletions

View File

@@ -19,6 +19,14 @@ def get_show_metadata(id: int = None, provider: str = "tmdb") -> Show:
return metadata_providers[provider].get_show_metadata(id)
def download_show_poster_image(show: Show) -> bool:
"""
Downloads the poster image for a show.
:param show: The show to download the poster image for.
:return: True if the image was downloaded successfully, False otherwise.
"""
return metadata_providers[show.metadata_provider].download_show_poster_image(show)
@cached(search_show_cache)
def search_show(
query: str | None = None, provider: str = "tmdb"