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

View file

@ -59,6 +59,14 @@ class LibrarySync(threading.Thread):
def FullLibrarySync(self,manualRun=False): 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') addon = xbmcaddon.Addon(id='plugin.video.emby')
startupDone = WINDOW.getProperty("startup") == "done" startupDone = WINDOW.getProperty("startup") == "done"
@ -113,16 +121,6 @@ class LibrarySync(threading.Thread):
try: try:
completed = True 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 ### ### PROCESS VIDEO LIBRARY ###
#create the sql connection to video db #create the sql connection to video db
@ -188,6 +186,7 @@ class LibrarySync(threading.Thread):
pDialog.close() pDialog.close()
return True return True
def SaveLastSync(self): def SaveLastSync(self):
# save last sync time # save last sync time
addon = xbmcaddon.Addon(id='plugin.video.emby') addon = xbmcaddon.Addon(id='plugin.video.emby')