update activity on disk at tme of activity

delete activity once used
This commit is contained in:
Shaun
2018-02-24 09:52:14 +11:00
parent 1ba07a785d
commit b21322de16
3 changed files with 2 additions and 3 deletions

View File

@@ -97,8 +97,8 @@ class DownloadUtils():
log.debug("Version Check Data: {0}", postBody)
conn.request(method="POST", url="/version", body=postBody, headers=head)
data = conn.getresponse()
ret_data = "null"
if int(data.status) == 200:
xbmcvfs.delete(path)
ret_data = data.read()
log.debug("VERSION_CHECK: RESPONCE: {0}", ret_data)
message = json.loads(ret_data)

View File

@@ -801,6 +801,7 @@ class Service(xbmc.Player):
if playback_type not in self.activity[today]:
self.activity[today][playback_type] = 0
self.activity[today][playback_type] += 1
self.save_activity()
def onPlayBackEnded(self):
# Will be called when kodi stops playing a file

View File

@@ -105,8 +105,6 @@ while not xbmc.abortRequested:
xbmc.sleep(1000)
monitor.save_activity()
# stop the WebSocket Client
websocket_client.stop_client()