Fix series pooling

If there's the same series in different libraries
This commit is contained in:
angelblue05 2016-09-20 21:39:21 -05:00
parent d7245c810c
commit 0e50f13055

View file

@ -1058,14 +1058,13 @@ class TVShows(Items):
query = "SELECT idShow FROM tvshow WHERE C12 = ?" query = "SELECT idShow FROM tvshow WHERE C12 = ?"
kodicursor.execute(query, (tvdb,)) kodicursor.execute(query, (tvdb,))
try: try:
showid = kodicursor.fetchone()[0] temp_showid = kodicursor.fetchone()[0]
except TypeError: except TypeError:
pass pass
else: else:
emby_other = emby_db.getItem_byKodiId(showid, "tvshow") emby_other = emby_db.getItem_byKodiId(temp_showid, "tvshow")
if viewid == emby_other[2]: if viewid == emby_other[2]:
log.info("Applying series pooling for %s", title) log.info("Applying series pooling for %s", title)
emby_other_item = emby_db.getItem_byId(emby_other[0]) emby_other_item = emby_db.getItem_byId(emby_other[0])
showid = emby_other_item[0] showid = emby_other_item[0]
pathid = emby_other_item[2] pathid = emby_other_item[2]