From 3b18a92ab4464432e759d3469ae9b8e2f96ee322 Mon Sep 17 00:00:00 2001 From: croneter Date: Fri, 8 Feb 2019 12:04:24 +0100 Subject: [PATCH 1/2] Fix PKC becoming unresponsive --- resources/lib/artwork.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/resources/lib/artwork.py b/resources/lib/artwork.py index 8c20127b..4d1dd957 100644 --- a/resources/lib/artwork.py +++ b/resources/lib/artwork.py @@ -30,12 +30,12 @@ def double_urldecode(text): class ImageCachingThread(backgroundthread.KillableThread): def __init__(self): super(ImageCachingThread, self).__init__() - self.suspend_points = [self._suspended] + self.suspend_points = [(self, '_suspended')] if not utils.settings('imageSyncDuringPlayback') == 'true': - self.suspend_points.append(app.APP.is_playing_video) + self.suspend_points.append((app.APP, 'is_playing_video')) def isSuspended(self): - return any(self.suspend_points) + return any(getattr(obj, txt) for obj, txt in self.suspend_points) def _url_generator(self, kind, kodi_type): """ From cd728b4c327713d7659f3b24a3abbcfbaf27ce9e Mon Sep 17 00:00:00 2001 From: croneter Date: Fri, 8 Feb 2019 11:21:21 +0100 Subject: [PATCH 2/2] Fix PKC becoming unresponsive --- resources/lib/app/application.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/resources/lib/app/application.py b/resources/lib/app/application.py index dd850a53..1a119cc4 100644 --- a/resources/lib/app/application.py +++ b/resources/lib/app/application.py @@ -124,6 +124,9 @@ class App(object): for thread in self.threads: if not thread.suspend_reached: LOG.debug('Waiting for thread to suspend: %s', thread) + # Send suspend signal again in case self.threads + # changed + thread.suspend() if self.monitor.waitForAbort(0.1): return True break