always rebuild the nodes and create sources on a startup sync

This commit is contained in:
shaun 2015-08-02 16:24:15 +10:00
parent 50d83dee7e
commit 6df36cd6a3
2 changed files with 13 additions and 14 deletions

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="plugin.video.emby"
name="Emby"
version="1.1.20"
version="1.1.21"
provider-name="Emby.media">
<requires>
<import addon="xbmc.python" version="2.1.0"/>

View file

@ -59,6 +59,14 @@ class LibrarySync(threading.Thread):
def FullLibrarySync(self,manualRun=False):
### BUILD VIDEO NODES LISTING ###
VideoNodes().buildVideoNodesListing()
### CREATE SOURCES ###
if addon.getSetting("Sources") != "true":
# Only create sources once
self.logMsg("Sources.xml created.", 0)
utils.createSources()
addon.setSetting("Sources", "true")
addon = xbmcaddon.Addon(id='plugin.video.emby')
startupDone = WINDOW.getProperty("startup") == "done"
@ -112,17 +120,7 @@ class LibrarySync(threading.Thread):
try:
completed = True
### BUILD VIDEO NODES LISTING ###
VideoNodes().buildVideoNodesListing()
### CREATE SOURCES ###
if addon.getSetting("Sources") != "true":
# Only create sources once
self.logMsg("Sources.xml created.", 0)
utils.createSources()
addon.setSetting("Sources", "true")
### PROCESS VIDEO LIBRARY ###
#create the sql connection to video db
@ -187,13 +185,14 @@ class LibrarySync(threading.Thread):
if(pDialog != None):
pDialog.close()
return True
return True
def SaveLastSync(self):
# save last sync time
addon = xbmcaddon.Addon(id='plugin.video.emby')
lastSync = (datetime.utcnow() - timedelta(minutes=5)).strftime('%Y-%m-%dT%H:%M:%SZ')
utils.logMsg("Sync Database", "Incremental Sync Setting Last Run Time Saved : " + lastSync, 0)
addon.setSetting("LastIncrenetalSync", lastSync)
addon.setSetting("LastIncrenetalSync", lastSync)
def MoviesFullSync(self,connection,cursor, pDialog):