mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-26 10:46:11 +00:00
for consistency use the same approach for none full sync
This commit is contained in:
parent
25286717b3
commit
6039611da5
1 changed files with 3 additions and 20 deletions
|
@ -319,30 +319,13 @@ class LibrarySync():
|
||||||
for episode in latestMBEpisodes:
|
for episode in latestMBEpisodes:
|
||||||
if episode["SeriesId"] in allKodiTvShowsIds:
|
if episode["SeriesId"] in allKodiTvShowsIds:
|
||||||
#only process tvshows that already exist in the db at incremental updates
|
#only process tvshows that already exist in the db at incremental updates
|
||||||
allKodiTVShows = ReadKodiDB().getKodiTvShows(False)
|
|
||||||
kodishow = allKodiTVShows.get(episode["SeriesId"],None)
|
|
||||||
kodiEpisodes = ReadKodiDB().getKodiEpisodes(kodishow["tvshowid"],True,True)
|
|
||||||
|
|
||||||
if(self.ShouldStop(pDialog)):
|
if(self.ShouldStop(pDialog)):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
#we have to compare the lists somehow
|
WriteKodiDB().addEpisodeToKodiLibrary(episode, connection, cursor)
|
||||||
comparestring1 = str(episode.get("ParentIndexNumber")) + "-" + str(episode.get("IndexNumber"))
|
progressAction = "Adding"
|
||||||
matchFound = False
|
totalItemsAdded += 1
|
||||||
if kodiEpisodes != None:
|
|
||||||
KodiItem = kodiEpisodes.get(comparestring1, None)
|
|
||||||
if(KodiItem != None):
|
|
||||||
matchFound = True
|
|
||||||
|
|
||||||
progressAction = "Checking"
|
|
||||||
if not matchFound:
|
|
||||||
#no match so we have to create it
|
|
||||||
WriteKodiDB().addEpisodeToKodiLibrary(episode,connection, cursor)
|
|
||||||
progressAction = "Adding"
|
|
||||||
totalItemsAdded += 1
|
|
||||||
|
|
||||||
if(self.ShouldStop(pDialog)):
|
|
||||||
return False
|
|
||||||
|
|
||||||
# update progress bar
|
# update progress bar
|
||||||
if(pDialog != None):
|
if(pDialog != None):
|
||||||
|
|
Loading…
Reference in a new issue