Skip to content

Commit

Permalink
Fix where TMDB may dump str in csv than individual int
Browse files Browse the repository at this point in the history
  • Loading branch information
nattadasu authored Aug 7, 2023
1 parent a95b379 commit a247569
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion generator/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -830,11 +830,14 @@ def combine_fribb(
for fbi in fribb:
anidb_id = fbi.get('anidb_id', None)
imdb = fbi.get('imdb_id', None)
tmdb = fbi.get('themoviedb_id', None)
tmdb: str | int | None = fbi.get('themoviedb_id', None)
if anidb is not None and anidb_id == anidb:
# Combine the data from fribb_item with the item in aod_data
data_fbi = {}
data_fbi['imdb'] = imdb
if isinstance(tmdb, str):
tmdbl: list[str] = tmdb.split(",")
tmdb: int = int(tmdb[0])
data_fbi['themoviedb'] = tmdb
# if item["trakt_type"] and tmdb:
# data_fbi['themoviedb'] = tmdb
Expand Down

0 comments on commit a247569

Please sign in to comment.