diff --git a/resources/lib/kodimonitor.py b/resources/lib/kodimonitor.py index a224f08e..fd376dee 100644 --- a/resources/lib/kodimonitor.py +++ b/resources/lib/kodimonitor.py @@ -43,7 +43,7 @@ class KodiMonitor(xbmc.Monitor): def onScanFinished(self, library): - log.debug("Kodi library scan %s finished", library) + log.info("Kodi library scan %s finished", library) if library == "video": window('emby_kodiScan', clear=True) @@ -74,6 +74,7 @@ class KodiMonitor(xbmc.Monitor): return if method == 'Player.OnPlay': + self.retry = True self._on_play_(data) elif method == 'VideoLibrary.OnUpdate': diff --git a/resources/lib/service_entry.py b/resources/lib/service_entry.py index 74ca2f5a..8d469819 100644 --- a/resources/lib/service_entry.py +++ b/resources/lib/service_entry.py @@ -291,17 +291,16 @@ class Service(object): kodi_player = self.kodi_player try: play_time = kodi_player.getTime() - filename = kodi_player.currentFile - + filename = kodi_player.getPlayingFile() # Update positionticks - if filename in kodi_player.played_info: + if filename in kodi_player.played_info and play_time > 0: kodi_player.played_info[filename]['currentPosition'] = play_time difference = datetime.today() - self.last_progress difference_seconds = difference.seconds # Report progress to Emby server - if difference_seconds > 3: + if difference_seconds > 9: kodi_player.reportPlayback() self.last_progress = datetime.today()