mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-25 10:16:11 +00:00
remove some redundant code calls and do a shouldstop call in the add loop
This commit is contained in:
parent
f2772ebdbd
commit
25286717b3
2 changed files with 15 additions and 9 deletions
|
@ -74,6 +74,7 @@ class LibrarySync():
|
|||
|
||||
finally:
|
||||
WINDOW.setProperty("SyncDatabaseRunning", "false")
|
||||
utils.logMsg("Sync DB", "syncDatabase Exiting", 0)
|
||||
cursor.close()
|
||||
|
||||
return True
|
||||
|
@ -448,6 +449,10 @@ class LibrarySync():
|
|||
count = 0
|
||||
|
||||
for item in episodeData:
|
||||
|
||||
if(self.ShouldStop(pDialog)):
|
||||
return False
|
||||
|
||||
progressAction = "Adding"
|
||||
WriteKodiDB().addEpisodeToKodiLibrary(item, connection, cursor)
|
||||
|
||||
|
|
|
@ -150,8 +150,8 @@ class WriteKodiDB():
|
|||
port = addon.getSetting('port')
|
||||
host = addon.getSetting('ipaddress')
|
||||
server = host + ":" + port
|
||||
downloadUtils = DownloadUtils()
|
||||
userid = downloadUtils.getUserId()
|
||||
#downloadUtils = DownloadUtils()
|
||||
#userid = downloadUtils.getUserId()
|
||||
|
||||
timeInfo = API().getTimeInfo(MBitem)
|
||||
userData=API().getUserData(MBitem)
|
||||
|
@ -354,8 +354,8 @@ class WriteKodiDB():
|
|||
port = addon.getSetting('port')
|
||||
host = addon.getSetting('ipaddress')
|
||||
server = host + ":" + port
|
||||
downloadUtils = DownloadUtils()
|
||||
userid = downloadUtils.getUserId()
|
||||
#downloadUtils = DownloadUtils()
|
||||
#userid = downloadUtils.getUserId()
|
||||
|
||||
timeInfo = API().getTimeInfo(MBitem)
|
||||
people = API().getPeople(MBitem)
|
||||
|
@ -760,8 +760,8 @@ class WriteKodiDB():
|
|||
port = addon.getSetting('port')
|
||||
host = addon.getSetting('ipaddress')
|
||||
server = host + ":" + port
|
||||
downloadUtils = DownloadUtils()
|
||||
userid = downloadUtils.getUserId()
|
||||
#downloadUtils = DownloadUtils()
|
||||
#userid = downloadUtils.getUserId()
|
||||
|
||||
timeInfo = API().getTimeInfo(MBitem)
|
||||
userData=API().getUserData(MBitem)
|
||||
|
@ -986,8 +986,8 @@ class WriteKodiDB():
|
|||
port = addon.getSetting('port')
|
||||
host = addon.getSetting('ipaddress')
|
||||
server = host + ":" + port
|
||||
downloadUtils = DownloadUtils()
|
||||
userid = downloadUtils.getUserId()
|
||||
#downloadUtils = DownloadUtils()
|
||||
#userid = downloadUtils.getUserId()
|
||||
|
||||
timeInfo = API().getTimeInfo(MBitem)
|
||||
userData=API().getUserData(MBitem)
|
||||
|
@ -1352,4 +1352,5 @@ class WriteKodiDB():
|
|||
strSet = boxset["Name"]
|
||||
kodiMovie = ReadKodiDB().getKodiMovie(boxsetmovie["Id"])
|
||||
if kodiMovie != None:
|
||||
WriteKodiDB().updateProperty(kodiMovie,"set",strSet,"movie",True)
|
||||
WriteKodiDB().updateProperty(kodiMovie,"set",strSet,"movie",True)
|
||||
|
Loading…
Reference in a new issue