diff --git a/resources/lib/plex_companion/playstate.py b/resources/lib/plex_companion/playstate.py index 853e58af..1cf70a70 100644 --- a/resources/lib/plex_companion/playstate.py +++ b/resources/lib/plex_companion/playstate.py @@ -12,6 +12,7 @@ from .. import backgroundthread from .. import app from .. import timing from .. import playqueue as PQ +from .. import skip_plex_intro # Disable annoying requests warnings @@ -383,6 +384,12 @@ class PlaystateMgr(backgroundthread.KillableThread): else: continue signaled_playback_stop = False + try: + # Check whether an intro is currently running + skip_plex_intro.check() + except IndexError: + # Playback might have already stopped + pass # Send the playback progress info to the PMS self.pms_timeline(players, message) # Send the info to all Companion devices via the PMS diff --git a/resources/lib/service_entry.py b/resources/lib/service_entry.py index 4cf8ac34..d33a288e 100644 --- a/resources/lib/service_entry.py +++ b/resources/lib/service_entry.py @@ -19,7 +19,6 @@ from . import variables as v from . import app from . import loghandler from . import backgroundthread -from . import skip_plex_intro from .windows import userselect ############################################################################### @@ -558,9 +557,6 @@ class Service(object): self.playqueue.start() self.alexa_ws.start() - elif app.APP.is_playing: - skip_plex_intro.check() - xbmc.sleep(200) # EXITING PKC diff --git a/resources/lib/skip_plex_intro.py b/resources/lib/skip_plex_intro.py index 3ab4cddc..ec6d76ad 100644 --- a/resources/lib/skip_plex_intro.py +++ b/resources/lib/skip_plex_intro.py @@ -32,8 +32,6 @@ def skip_intro(intros): def check(): with app.APP.lock_playqueues: - if len(app.PLAYSTATE.active_players) != 1: - return playerid = list(app.PLAYSTATE.active_players)[0] intros = app.PLAYSTATE.player_states[playerid]['intro_markers'] if not intros: