Revert "Fix Plex ratingKey being stored as int, not str"

This reverts commit 6bfd67a41d.
This commit is contained in:
tomkat83 2018-01-02 15:12:01 +01:00
parent f4e83f6be5
commit 359a8d0221
2 changed files with 4 additions and 4 deletions

View file

@ -302,7 +302,7 @@ class KodiMonitor(Monitor):
with plexdb.Get_Plex_DB() as plex_db: with plexdb.Get_Plex_DB() as plex_db:
plex_dbitem = plex_db.getItem_byKodiId(kodi_id, kodi_type) plex_dbitem = plex_db.getItem_byKodiId(kodi_id, kodi_type)
try: try:
plex_id = str(plex_dbitem[0]) plex_id = plex_dbitem[0]
plex_type = plex_dbitem[2] plex_type = plex_dbitem[2]
except TypeError: except TypeError:
# No plex id, hence item not in the library. E.g. clips # No plex id, hence item not in the library. E.g. clips

View file

@ -183,7 +183,7 @@ class Playlist_Item(object):
plex_id = None [str] Plex unique item id, "ratingKey" plex_id = None [str] Plex unique item id, "ratingKey"
plex_type = None [str] Plex type, e.g. 'movie', 'clip' plex_type = None [str] Plex type, e.g. 'movie', 'clip'
plex_uuid = None [str] Plex librarySectionUUID plex_uuid = None [str] Plex librarySectionUUID
kodi_id = None [int] Kodi unique kodi id (unique only within type!) kodi_id = None Kodi unique kodi id (unique only within type!)
kodi_type = None [str] Kodi type: 'movie' kodi_type = None [str] Kodi type: 'movie'
file = None [str] Path to the item's file. STRING!! file = None [str] Path to the item's file. STRING!!
uri = None [str] Weird Plex uri path involving plex_uuid. STRING! uri = None [str] Weird Plex uri path involving plex_uuid. STRING!
@ -276,9 +276,9 @@ def playlist_item_from_kodi(kodi_item):
plex_dbitem = plex_db.getItem_byKodiId(kodi_item['id'], plex_dbitem = plex_db.getItem_byKodiId(kodi_item['id'],
kodi_item['type']) kodi_item['type'])
try: try:
item.plex_id = str(plex_dbitem[0]) item.plex_id = plex_dbitem[0]
item.plex_type = plex_dbitem[2] item.plex_type = plex_dbitem[2]
item.plex_uuid = str(plex_dbitem[0]) # we dont need the uuid yet :-) item.plex_uuid = plex_dbitem[0] # we dont need the uuid yet :-)
except TypeError: except TypeError:
pass pass
item.file = kodi_item.get('file') item.file = kodi_item.get('file')