Skip to content

Commit

Permalink
Fix error when kodi is not playing video any longer (#298)
Browse files Browse the repository at this point in the history
* v1.1.19  Fix error when kodi is not playing video any longer

* Re-add: Fix failing ci workflow (#291)

* Revert "Re-add: Fix failing ci workflow (#291)"

This reverts commit ff70b40.

* Revert "v1.1.19  Fix error when kodi is not playing video any longer"

This reverts commit 2a07efc.

* Fix error when kodi is not playing video any longer

* Fix incorrect class import

---------

Co-authored-by: MoojMidge <56883549+MoojMidge@users.noreply.github.com>
  • Loading branch information
AnonTester and MoojMidge committed May 10, 2023
1 parent 147ed85 commit 30b647b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions resources/lib/playbackmanager.py
Expand Up @@ -5,7 +5,7 @@
from xbmc import sleep
from api import Api
from demo import DemoOverlay
from player import Player
from player import UpNextPlayer
from playitem import PlayItem
from state import State
from stillwatching import StillWatching
Expand All @@ -21,7 +21,7 @@ def __init__(self):
self.api = Api()
self.play_item = PlayItem()
self.state = State()
self.player = Player()
self.player = UpNextPlayer()
self.demo = DemoOverlay(12005)

def log(self, msg, level=2):
Expand Down
6 changes: 3 additions & 3 deletions resources/lib/playitem.py
Expand Up @@ -4,7 +4,7 @@
from __future__ import absolute_import, division, unicode_literals
from xbmc import PlayList
from api import Api
from player import Player
from player import UpNextPlayer
from state import State
from utils import log as ulog

Expand All @@ -15,7 +15,7 @@ class PlayItem:
def __init__(self):
self.__dict__ = self._shared_state
self.api = Api()
self.player = Player()
self.player = UpNextPlayer()
self.state = State()

def log(self, msg, level=2):
Expand Down Expand Up @@ -58,7 +58,7 @@ def get_next(self):

# Next video from Kodi library
else:
current_file = self.player.getPlayingFile()
current_file = self.player.get_last_file()
# Get the active player
result = self.api.get_now_playing()
self.handle_now_playing_result(result)
Expand Down

0 comments on commit 30b647b

Please sign in to comment.