Fix watched status issue

Caused by intros.
This commit is contained in:
angelblue05 2018-01-28 01:36:54 -06:00
parent e6dcf1333c
commit 3f111f554e
3 changed files with 9 additions and 5 deletions

View file

@ -163,9 +163,9 @@ class KodiMonitor(xbmc.Monitor):
item_id = self._get_item_id(kodi_id, item_type) item_id = self._get_item_id(kodi_id, item_type)
if item_id: if item_id:
# Stop from manually marking as watched unwatched, with actual playback. # Stop from manually marking as watched unwatched, with actual playback.
if window('emby_skipWatched%s' % item_id) == "true": if window('emby.skip.%s' % item_id) == "true":
# property is set in player.py # property is set in player.py
window('emby_skipWatched%s' % item_id, clear=True) window('emby.skip.%s' % item_id, clear=True)
else: else:
# notify the server # notify the server
url = "{server}/emby/Users/{UserId}/PlayedItems/%s?format=json" % item_id url = "{server}/emby/Users/{UserId}/PlayedItems/%s?format=json" % item_id

View file

@ -160,6 +160,8 @@ class PlaybackUtils(object):
self.stack.append([url, listitem]) self.stack.append([url, listitem])
window('emby.skip.%s' % self.item['Id'], value="true")
def _set_additional_parts(self, item_id): def _set_additional_parts(self, item_id):
parts = self.emby.get_additional_parts(item_id) parts = self.emby.get_additional_parts(item_id)
@ -211,6 +213,9 @@ class PlaybackUtils(object):
elif mediatype == "Audio": elif mediatype == "Audio":
metadata['mediatype'] = "song" metadata['mediatype'] = "song"
else:
metadata['mediatype'] = "video"
if dbid: if dbid:
metadata['dbid'] = dbid metadata['dbid'] = dbid
else: else:
@ -219,7 +224,7 @@ class PlaybackUtils(object):
listitem.setProperty('IsPlayable', 'true') listitem.setProperty('IsPlayable', 'true')
listitem.setProperty('IsFolder', 'false') listitem.setProperty('IsFolder', 'false')
listitem.setLabel(metadata['title']) listitem.setLabel(metadata['title'])
listitem.setInfo('Music' if mediatype == "Audio" else 'Video', infoLabels=metadata) listitem.setInfo('music' if mediatype == "Audio" else 'video', infoLabels=metadata)
def set_properties(self, url, listitem): def set_properties(self, url, listitem):

View file

@ -136,7 +136,6 @@ class Player(xbmc.Player):
#self.set_audio_subs(item.get('forcedaudio'), item.get('forcedsubs')) #self.set_audio_subs(item.get('forcedaudio'), item.get('forcedsubs'))
window('emby_skipWatched%s' % item_id, value="true")
customseek = window('emby_customPlaylist.seektime') customseek = window('emby_customPlaylist.seektime')
if window('emby_customPlaylist') == "true" and customseek: if window('emby_customPlaylist') == "true" and customseek:
# Start at, when using custom playlist (play to Kodi from webclient) # Start at, when using custom playlist (play to Kodi from webclient)
@ -457,7 +456,7 @@ class Player(xbmc.Player):
playMethod = data['playmethod'] playMethod = data['playmethod']
# Prevent manually mark as watched in Kodi monitor # Prevent manually mark as watched in Kodi monitor
window('emby_skipWatched%s' % itemid, value="true") window('emby.skip.%s' % itemid, value="true")
self.stopPlayback(data) self.stopPlayback(data)