Code cleanup

This commit is contained in:
croneter 2018-04-15 16:34:45 +02:00
parent ecc8df014c
commit 5f26692e0f
2 changed files with 6 additions and 5 deletions

View file

@ -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 ##===----")

View file

@ -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()