From 5f26692e0f0b76afb641199962d28df87bf12f79 Mon Sep 17 00:00:00 2001 From: croneter Date: Sun, 15 Apr 2018 16:34:45 +0200 Subject: [PATCH] Code cleanup --- resources/lib/playback_starter.py | 7 ++++--- service.py | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/resources/lib/playback_starter.py b/resources/lib/playback_starter.py index 7e8b01f8..c9c62232 100644 --- a/resources/lib/playback_starter.py +++ b/resources/lib/playback_starter.py @@ -18,11 +18,12 @@ LOG = getLogger("PLEX." + __name__) ############################################################################### -class Playback_Starter(Thread): +class PlaybackStarter(Thread): """ Processes new plays """ - def triage(self, item): + @staticmethod + def _triage(item): try: _, params = item.split('?', 1) except ValueError: @@ -58,6 +59,6 @@ class Playback_Starter(Thread): # Need to shutdown - initiated by command_pipeline break else: - self.triage(item) + self._triage(item) queue.task_done() LOG.info("----===## Playback_Starter stopped ##===----") diff --git a/service.py b/service.py index 792a15c2..258f055d 100644 --- a/service.py +++ b/service.py @@ -38,7 +38,7 @@ from websocket_client import PMS_Websocket, Alexa_Websocket from PlexFunctions import check_connection from PlexCompanion import PlexCompanion from command_pipeline import Monitor_Window -from playback_starter import Playback_Starter +from playback_starter import PlaybackStarter from playqueue import PlayqueueMonitor from artwork import Image_Cache_Thread import variables as v @@ -111,7 +111,7 @@ class Service(): self.library = LibrarySync() self.plexCompanion = PlexCompanion() self.specialMonitor = SpecialMonitor() - self.playback_starter = Playback_Starter() + self.playback_starter = PlaybackStarter() self.playqueue = PlayqueueMonitor() if settings('enableTextureCache') == "true": self.image_cache_thread = Image_Cache_Thread()