diff --git a/resources/lib/emby/core/ws_client.py b/resources/lib/emby/core/ws_client.py index c2253ca8..7d70ce64 100644 --- a/resources/lib/emby/core/ws_client.py +++ b/resources/lib/emby/core/ws_client.py @@ -82,6 +82,11 @@ class WSClient(threading.Thread): message = json.loads(message) data = message.get('Data', {}) + if message['MessageType'] in ('RefreshProgress'): + LOG.debug("Ignoring %s", message) + + return + if not self.client['config/app.default']: data['ServerId'] = self.client['auth/server-id'] diff --git a/resources/lib/entrypoint/service.py b/resources/lib/entrypoint/service.py index 8b105ee7..ddfbb4c9 100644 --- a/resources/lib/entrypoint/service.py +++ b/resources/lib/entrypoint/service.py @@ -38,7 +38,7 @@ class Service(xbmc.Monitor): monitor = None play_event = None warn = True - settings = {'last_progress': datetime.today()} + settings = {'last_progress': datetime.today(), 'last_progress_report': datetime.today()} def __init__(self): @@ -109,12 +109,13 @@ class Service(xbmc.Monitor): difference = datetime.today() - self.settings['last_progress'] if difference.seconds > 10: + self.settings['last_progress'] = datetime.today() - update = difference.seconds > 250 + update = (datetime.today() - self.settings['last_progress_report']).seconds > 250 event('ReportProgressRequested', {'Report': update}) - + if update: - self.settings['last_progress'] = datetime.today() + self.settings['last_progress_report'] = datetime.today() if window('emby.restart.bool'): window('emby.restart', clear=True)