[43] make IDs ints

pull/1052/head
meisnate12 2 years ago
parent e56d2e959b
commit c26e8a6b34

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

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

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

Loading…
Cancel
Save