mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-25 10:16:11 +00:00
dont do a lib scan or clean until the sync is full done
This commit is contained in:
parent
46f2a3ffdb
commit
9c98f713e7
2 changed files with 17 additions and 10 deletions
|
@ -140,7 +140,6 @@ class LibrarySync():
|
||||||
|
|
||||||
#we have to compare the lists somehow
|
#we have to compare the lists somehow
|
||||||
for item in episodeData:
|
for item in episodeData:
|
||||||
#xbmc.sleep(150) # sleep to not overload system --> can this be replaced by moving the sync to a different thread ?
|
|
||||||
comparestring1 = str(item.get("ParentIndexNumber")) + "-" + str(item.get("IndexNumber"))
|
comparestring1 = str(item.get("ParentIndexNumber")) + "-" + str(item.get("IndexNumber"))
|
||||||
matchFound = False
|
matchFound = False
|
||||||
progMessage = "Processing"
|
progMessage = "Processing"
|
||||||
|
@ -201,10 +200,10 @@ class LibrarySync():
|
||||||
return False
|
return False
|
||||||
|
|
||||||
if cleanNeeded:
|
if cleanNeeded:
|
||||||
xbmc.executebuiltin("CleanLibrary(video)")
|
WINDOW.setProperty("cleanNeeded", "true")
|
||||||
|
|
||||||
if updateNeeded:
|
if updateNeeded:
|
||||||
xbmc.executebuiltin("UpdateLibrary(video)")
|
WINDOW.setProperty("updateNeeded", "true")
|
||||||
|
|
||||||
finally:
|
finally:
|
||||||
WINDOW.clearProperty("librarysync")
|
WINDOW.clearProperty("librarysync")
|
||||||
|
|
14
service.py
14
service.py
|
@ -6,14 +6,11 @@ import threading
|
||||||
import json
|
import json
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|
||||||
|
|
||||||
addonSettings = xbmcaddon.Addon(id='plugin.video.mb3sync')
|
addonSettings = xbmcaddon.Addon(id='plugin.video.mb3sync')
|
||||||
cwd = addonSettings.getAddonInfo('path')
|
cwd = addonSettings.getAddonInfo('path')
|
||||||
BASE_RESOURCE_PATH = xbmc.translatePath( os.path.join( cwd, 'resources', 'lib' ) )
|
BASE_RESOURCE_PATH = xbmc.translatePath( os.path.join( cwd, 'resources', 'lib' ) )
|
||||||
sys.path.append(BASE_RESOURCE_PATH)
|
sys.path.append(BASE_RESOURCE_PATH)
|
||||||
|
|
||||||
WINDOW = xbmcgui.Window( 10000 )
|
|
||||||
|
|
||||||
import KodiMonitor
|
import KodiMonitor
|
||||||
import Utils as utils
|
import Utils as utils
|
||||||
from LibrarySync import LibrarySync
|
from LibrarySync import LibrarySync
|
||||||
|
@ -105,6 +102,17 @@ class Service():
|
||||||
cur_seconds_incrsync = interval_IncrementalSync - 10
|
cur_seconds_incrsync = interval_IncrementalSync - 10
|
||||||
else:
|
else:
|
||||||
cur_seconds_incrsync += 1
|
cur_seconds_incrsync += 1
|
||||||
|
|
||||||
|
# check if we need to run lib updates
|
||||||
|
WINDOW = xbmcgui.Window( 10000 )
|
||||||
|
if(WINDOW.getProperty("cleanNeeded") == "true"):
|
||||||
|
xbmc.executebuiltin("CleanLibrary(video)")
|
||||||
|
WINDOW.clearProperty("cleanNeeded")
|
||||||
|
|
||||||
|
if(WINDOW.getProperty("updateNeeded") == "true"):
|
||||||
|
xbmc.executebuiltin("UpdateLibrary(video)")
|
||||||
|
WINDOW.clearProperty("updateNeeded")
|
||||||
|
|
||||||
else:
|
else:
|
||||||
xbmc.log("Not authenticated yet")
|
xbmc.log("Not authenticated yet")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue