mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-25 18:26:15 +00:00
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_FullSync = 120
|
||||||
interval_IncrementalSync = 30
|
interval_IncrementalSync = 30
|
||||||
|
|
||||||
cur_seconds_fullsync = 0
|
cur_seconds_fullsync = interval_FullSync
|
||||||
cur_seconds_incrsync = 0
|
cur_seconds_incrsync = interval_IncrementalSync
|
||||||
|
|
||||||
while not xbmc.abortRequested:
|
while not xbmc.abortRequested:
|
||||||
|
|
||||||
|
@ -83,18 +83,18 @@ class Service():
|
||||||
if DownloadUtils().authenticate(retreive=False) != "":
|
if DownloadUtils().authenticate(retreive=False) != "":
|
||||||
|
|
||||||
#full sync
|
#full sync
|
||||||
if((interval_FullSync >= cur_seconds_fullsync)):
|
if(cur_seconds_fullsync >= interval_FullSync):
|
||||||
librarySync.syncDatabase()
|
librarySync.syncDatabase()
|
||||||
cur_seconds_fullsync = interval_FullSync
|
cur_seconds_fullsync = 0
|
||||||
else:
|
else:
|
||||||
cur_seconds_fullsync -= 1
|
cur_seconds_fullsync += 1
|
||||||
|
|
||||||
#incremental sync
|
#incremental sync
|
||||||
if((interval_IncrementalSync >= cur_seconds_incrsync)):
|
if(cur_seconds_incrsync >= interval_IncrementalSync):
|
||||||
librarySync.updatePlayCounts()
|
librarySync.updatePlayCounts()
|
||||||
cur_seconds_incrsync = interval_IncrementalSync
|
cur_seconds_incrsync = 0
|
||||||
else:
|
else:
|
||||||
cur_seconds_incrsync -= 1
|
cur_seconds_incrsync += 1
|
||||||
|
|
||||||
utils.logMsg("MB3 Sync Service" "stopping Service",0)
|
utils.logMsg("MB3 Sync Service" "stopping Service",0)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue