always rebuild the nodes and create sources on a startup sync
This commit is contained in:
parent
50d83dee7e
commit
6df36cd6a3
2 changed files with 13 additions and 14 deletions
|
@ -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"/>
|
||||||
|
|
|
@ -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"
|
||||||
|
@ -112,17 +120,7 @@ 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
|
||||||
|
@ -187,13 +185,14 @@ class LibrarySync(threading.Thread):
|
||||||
if(pDialog != None):
|
if(pDialog != None):
|
||||||
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')
|
||||||
lastSync = (datetime.utcnow() - timedelta(minutes=5)).strftime('%Y-%m-%dT%H:%M:%SZ')
|
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)
|
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):
|
def MoviesFullSync(self,connection,cursor, pDialog):
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue