[43] make IDs ints

This commit is contained in:
meisnate12 2022-09-22 11:17:22 -04:00
parent e56d2e959b
commit c26e8a6b34
3 changed files with 8 additions and 8 deletions

View file

@ -1 +1 @@
1.17.3-develop42
1.17.3-develop43

View file

@ -287,12 +287,12 @@ class Convert:
tmdb, tmdb_type = self.imdb_to_tmdb(imdb)
if tmdb and tmdb_type == "movie":
imdb_id.append(imdb)
tmdb_id.append(tmdb)
tmdb_id.append(int(tmdb))
added = True
if added is False and anidb_id in self._anidb_to_tvdb:
tvdb_id.append(self._anidb_to_tvdb[anidb_id])
tvdb_id.append(int(self._anidb_to_tvdb[anidb_id]))
elif anidb_id in self._anidb_to_tvdb:
tvdb_id.append(self._anidb_to_tvdb[anidb_id])
tvdb_id.append(int(self._anidb_to_tvdb[anidb_id]))
else:
raise Failed(f"AniDB: {anidb_id} not found")
else:
@ -300,7 +300,7 @@ class Convert:
for imdb in imdb_id:
tmdb, tmdb_type = self.imdb_to_tmdb(imdb)
if tmdb and ((tmdb_type == "movie" and library.is_movie) or (tmdb_type == "show" and library.is_show)):
tmdb_id.append(tmdb)
tmdb_id.append(int(tmdb))
if not imdb_id and tmdb_id and library.is_movie:
for tmdb in tmdb_id:
@ -312,7 +312,7 @@ class Convert:
for tmdb in tmdb_id:
tvdb = self.tmdb_to_tvdb(tmdb)
if tvdb:
tvdb_id.append(tvdb)
tvdb_id.append(int(tvdb))
if not tvdb_id:
raise Failed(f"Unable to convert TMDb ID: {', '.join([str(t) for t in tmdb_id])} to TVDb ID")

View file

@ -203,9 +203,9 @@ def pick_image(title, images, prioritize_assets, download_url_assets, item_dir,
def add_dict_list(keys, value, dict_map):
for key in keys:
if key in dict_map:
dict_map[key].append(value)
dict_map[key].append(int(value))
else:
dict_map[key] = [value]
dict_map[key] = [int(value)]
def get_list(data, lower=False, upper=False, split=True, int_list=False, trim=True):
if split is True: split = ","