Revert "Fix watched bug"

This reverts commit b3aca0542e.
This commit is contained in:
angelblue05 2017-05-07 18:19:55 -05:00
parent b3aca0542e
commit c46a64e579

View file

@ -92,10 +92,16 @@ class KodiMonitor(xbmc.Monitor):
def _on_play_(self, data): def _on_play_(self, data):
# Set up report progress for emby playback # Set up report progress for emby playback
try: try:
item = data['item'] if KODI >= 17:
kodi_id = item['id'] item = xbmc.Player().getVideoInfoTag()
item_type = item['type'] kodi_id = item.getDbId()
log.info("kodi_id: %s item_type: %s", kodi_id, item_type) item_type = item.getMediaType()
log.info("kodi_id: %s item_type: %s", kodi_id, item_type)
else:
item = data['item']
kodi_id = item['id']
item_type = item['type']
log.info("kodi_id: %s item_type: %s", kodi_id, item_type)
except (KeyError, TypeError): except (KeyError, TypeError):
log.info("Item is invalid for playstate update") log.info("Item is invalid for playstate update")
else: else: