mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-25 18:26:15 +00:00
attempt at fixing the toggeling (add/remove) of the pooled series episodes
This commit is contained in:
parent
b43c9343ca
commit
af1859cab3
1 changed files with 6 additions and 1 deletions
|
@ -567,7 +567,6 @@ class LibrarySync(threading.Thread):
|
||||||
##### PROCESS MOVIES #####
|
##### PROCESS MOVIES #####
|
||||||
for view in views:
|
for view in views:
|
||||||
|
|
||||||
log.info("Processing: %s", view)
|
|
||||||
if self.shouldStop():
|
if self.shouldStop():
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
@ -1263,6 +1262,8 @@ class ManualSync(LibrarySync):
|
||||||
except ValueError:
|
except ValueError:
|
||||||
all_koditvshows = {}
|
all_koditvshows = {}
|
||||||
|
|
||||||
|
log.info("all_koditvshows = %s" % all_koditvshows)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
all_kodiepisodes = dict(emby_db.get_checksum('Episode'))
|
all_kodiepisodes = dict(emby_db.get_checksum('Episode'))
|
||||||
except ValueError:
|
except ValueError:
|
||||||
|
@ -1319,6 +1320,7 @@ class ManualSync(LibrarySync):
|
||||||
|
|
||||||
itemid = embytvshow['Id']
|
itemid = embytvshow['Id']
|
||||||
title = embytvshow['Name']
|
title = embytvshow['Name']
|
||||||
|
all_embytvshowsIds.add(itemid)
|
||||||
if pdialog:
|
if pdialog:
|
||||||
percentage = int((float(count) / float(total))*100)
|
percentage = int((float(count) / float(total))*100)
|
||||||
pdialog.update(percentage, message=title)
|
pdialog.update(percentage, message=title)
|
||||||
|
@ -1341,6 +1343,7 @@ class ManualSync(LibrarySync):
|
||||||
API = api.API(embyepisode)
|
API = api.API(embyepisode)
|
||||||
itemid = embyepisode['Id']
|
itemid = embyepisode['Id']
|
||||||
all_embyepisodesIds.add(itemid)
|
all_embyepisodesIds.add(itemid)
|
||||||
|
all_embytvshowsIds.add(embyepisode['SeriesId'])
|
||||||
|
|
||||||
if all_kodiepisodes.get(itemid) != API.get_checksum():
|
if all_kodiepisodes.get(itemid) != API.get_checksum():
|
||||||
# Only update if movie is not in Kodi or checksum is different
|
# Only update if movie is not in Kodi or checksum is different
|
||||||
|
@ -1367,6 +1370,8 @@ class ManualSync(LibrarySync):
|
||||||
|
|
||||||
##### PROCESS DELETES #####
|
##### PROCESS DELETES #####
|
||||||
|
|
||||||
|
log.info("all_embytvshowsIds = %s " % all_embytvshowsIds)
|
||||||
|
|
||||||
for koditvshow in all_koditvshows:
|
for koditvshow in all_koditvshows:
|
||||||
if koditvshow not in all_embytvshowsIds:
|
if koditvshow not in all_embytvshowsIds:
|
||||||
tvshows.remove(koditvshow)
|
tvshows.remove(koditvshow)
|
||||||
|
|
Loading…
Reference in a new issue