mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-11-24 22:10:19 +00:00
Fix fast sync
try/except, default back to previous behavior.
This commit is contained in:
parent
ae6a9e6706
commit
83f3bb1937
@ -319,7 +319,13 @@ class Library(threading.Thread):
|
||||
|
||||
def save_last_sync(self):
|
||||
|
||||
time_now = datetime.strptime(self.server['config/server-time'].split(', ', 1)[1], '%d %b %Y %H:%M:%S GMT') - timedelta(minutes=2)
|
||||
try:
|
||||
time_now = datetime.strptime(self.server['config/server-time'].split(', ', 1)[1], '%d %b %Y %H:%M:%S GMT') - timedelta(minutes=2)
|
||||
except Exception as error:
|
||||
|
||||
LOG.error(error)
|
||||
time_now = datetime.utcnow() - timedelta(minutes=2)
|
||||
|
||||
last_sync = time_now.strftime('%Y-%m-%dT%H:%M:%Sz')
|
||||
settings('LastIncrementalSync', value=last_sync)
|
||||
LOG.info("--[ sync/%s ]", last_sync)
|
||||
|
Loading…
Reference in New Issue
Block a user