Fix AttributeError on playback start

- Hopefully fixes #428
This commit is contained in:
croneter 2018-03-14 07:41:53 +01:00
parent ff53086d0b
commit bc8546b4ff

View file

@ -279,10 +279,9 @@ class KodiMonitor(Monitor):
except TypeError:
kodi_id = None
# If using direct paths and starting playback from a widget
if not path.startswith('http'):
if not kodi_id:
if not kodi_id and kodi_type and path and not path.startswith('http'):
kodi_id = kodiid_from_filename(path, kodi_type)
if not plex_id and kodi_id:
if not plex_id and kodi_id and kodi_type:
with plexdb.Get_Plex_DB() as plex_db:
plex_dbitem = plex_db.getItem_byKodiId(kodi_id, kodi_type)
try: