Fix Plex playQueue ID not being recorded
This commit is contained in:
parent
30bcafea05
commit
359603ac0f
1 changed files with 19 additions and 18 deletions
|
@ -292,24 +292,25 @@ class PlaybackUtils():
|
||||||
api = API(item)
|
api = API(item)
|
||||||
if api.getType() == PLEX_TYPE_CLIP:
|
if api.getType() == PLEX_TYPE_CLIP:
|
||||||
self.add_trailer(item)
|
self.add_trailer(item)
|
||||||
continue
|
else:
|
||||||
with Get_Plex_DB() as plex_db:
|
with Get_Plex_DB() as plex_db:
|
||||||
db_item = plex_db.getItem_byId(api.getRatingKey())
|
db_item = plex_db.getItem_byId(api.getRatingKey())
|
||||||
try:
|
try:
|
||||||
add_item_to_kodi_playlist(self.playqueue,
|
add_item_to_kodi_playlist(self.playqueue,
|
||||||
self.currentPosition,
|
self.currentPosition,
|
||||||
kodi_id=db_item[0],
|
kodi_id=db_item[0],
|
||||||
kodi_type=db_item[4])
|
kodi_type=db_item[4])
|
||||||
self.currentPosition += 1
|
self.currentPosition += 1
|
||||||
if len(item[0]) > 1:
|
if len(item[0]) > 1:
|
||||||
self.add_part(item,
|
self.add_part(item,
|
||||||
api,
|
api,
|
||||||
db_item[0],
|
db_item[0],
|
||||||
db_item[4])
|
db_item[4])
|
||||||
except TypeError:
|
except TypeError:
|
||||||
# Item not in Kodi DB
|
# Item not in Kodi DB
|
||||||
self.add_trailer(item)
|
self.add_trailer(item)
|
||||||
continue
|
self.playqueue.items[self.currentPosition - 1].ID = item.get(
|
||||||
|
'%sItemID' % self.playqueue.kind)
|
||||||
|
|
||||||
def add_trailer(self, item):
|
def add_trailer(self, item):
|
||||||
# Playurl needs to point back so we can get metadata!
|
# Playurl needs to point back so we can get metadata!
|
||||||
|
|
Loading…
Reference in a new issue