Fix playback report for trailers seeming like movie

This commit is contained in:
tomkat83 2016-04-11 15:11:50 +02:00
parent f368f02abf
commit 7f956c6f18

View file

@ -166,14 +166,8 @@ class KodiMonitor(xbmc.Monitor):
try: try:
kodiid = item['id'] kodiid = item['id']
except (KeyError, TypeError): except (KeyError, TypeError):
log('Kodi did not give us a Kodi item id, trying to get from item ' log("Item is invalid for PMS playstate update.", 0)
'title', 0) return
# Try to get itemid with the element's title
with kodidb.GetKodiDB('video') as kodi_db:
kodiid = kodi_db.getIdFromTitle(item)
if kodiid is False:
log("Item is invalid for PMS playstate update.", 0)
return
# Get Plex' item id # Get Plex' item id
with embydb.GetEmbyDB() as emby_db: with embydb.GetEmbyDB() as emby_db: