Skip to content

Commit

Permalink
fix for retrieving language from storytel
Browse files Browse the repository at this point in the history
  • Loading branch information
ballaballaballa authored and jo1gi committed Sep 15, 2024
1 parent bb09f8a commit 0a3ea07
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions audiobookdl/sources/storytel.py
Original file line number Diff line number Diff line change
Expand Up @@ -460,9 +460,9 @@ def get_metadata(self, book_details) -> AudiobookMetadata:
if "description" in book_details:
metadata.description = book_details["description"]
if "language" in book_details:
if "name" in book_details["language"]:
if book_details["language"]:
metadata.language = pycountry.languages.get(
name=book_details["language"]["name"]
alpha_2=book_details["language"]
)
if "category" in book_details:
if "name" in book_details["category"]:
Expand Down

0 comments on commit 0a3ea07

Please sign in to comment.