only send new debug data, send more often

This commit is contained in:
j 2016-02-27 12:31:12 +05:30
commit 0fb3d1a65a
2 changed files with 17 additions and 10 deletions

View file

@ -26,13 +26,15 @@ class Downloads(Thread):
self.transfers = SqliteDict(self._dbpath, tablename='transfers', autocommit=False)
def download_updates(self):
now = int(time.mktime(time.gmtime()))
now = int(time.time())
if now > settings.server.get('last_update_check', 0) + 24*60*60:
settings.server['last_update_check'] = now
update.download()
state.user().export_library()
if settings.preferences.get('sendDiagnostics'):
utils.send_debug()
if settings.preferences.get('sendDiagnostics') and \
now > settings.server.get('last_send_diagnostics', 0) + 60*60:
utils.send_debug()
settings.server['last_send_diagnostics'] = now
def download_next(self):
import item.models