update activity on disk at tme of activity
delete activity once used
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -105,8 +105,6 @@ while not xbmc.abortRequested:
|
||||
|
||||
xbmc.sleep(1000)
|
||||
|
||||
monitor.save_activity()
|
||||
|
||||
# stop the WebSocket Client
|
||||
websocket_client.stop_client()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user