Merge branch 'master' of https://github.com/marcelveldt/plugin.video.mb3sync
This commit is contained in:
commit
2d3f81a059
1 changed files with 8 additions and 8 deletions
16
service.py
16
service.py
|
@ -49,8 +49,8 @@ class Service():
|
|||
interval_FullSync = 120
|
||||
interval_IncrementalSync = 30
|
||||
|
||||
cur_seconds_fullsync = 0
|
||||
cur_seconds_incrsync = 0
|
||||
cur_seconds_fullsync = interval_FullSync
|
||||
cur_seconds_incrsync = interval_IncrementalSync
|
||||
|
||||
while not xbmc.abortRequested:
|
||||
|
||||
|
@ -83,18 +83,18 @@ class Service():
|
|||
if DownloadUtils().authenticate(retreive=False) != "":
|
||||
|
||||
#full sync
|
||||
if((interval_FullSync >= cur_seconds_fullsync)):
|
||||
if(cur_seconds_fullsync >= interval_FullSync):
|
||||
librarySync.syncDatabase()
|
||||
cur_seconds_fullsync = interval_FullSync
|
||||
cur_seconds_fullsync = 0
|
||||
else:
|
||||
cur_seconds_fullsync -= 1
|
||||
cur_seconds_fullsync += 1
|
||||
|
||||
#incremental sync
|
||||
if((interval_IncrementalSync >= cur_seconds_incrsync)):
|
||||
if(cur_seconds_incrsync >= interval_IncrementalSync):
|
||||
librarySync.updatePlayCounts()
|
||||
cur_seconds_incrsync = interval_IncrementalSync
|
||||
cur_seconds_incrsync = 0
|
||||
else:
|
||||
cur_seconds_incrsync -= 1
|
||||
cur_seconds_incrsync += 1
|
||||
|
||||
utils.logMsg("MB3 Sync Service" "stopping Service",0)
|
||||
|
||||
|
|
Loading…
Reference in a new issue