only send diagnostics if online

This commit is contained in:
j 2016-02-27 15:50:10 +05:30
parent e86b9a210a
commit 5ce8fa99de

View file

@ -32,7 +32,8 @@ class Downloads(Thread):
update.download()
state.user().export_library()
if settings.preferences.get('sendDiagnostics') and \
now > settings.server.get('last_send_diagnostics', 0) + 60*60:
now > settings.server.get('last_send_diagnostics', 0) + 60*60 and \
state.online:
utils.send_debug()
settings.server['last_send_diagnostics'] = now