Fix AttributeErrors for Plex playlist id

This commit is contained in:
Croneter 2018-05-01 16:31:03 +02:00
parent 7b64b794f2
commit e2c90ac0f4
2 changed files with 3 additions and 3 deletions

View file

@ -33,7 +33,7 @@ DEFAULT_ENCODING = sys.getdefaultencoding()
def create_plex_playlist(playlist=None, path=None): def create_plex_playlist(playlist=None, path=None):
""" """
Adds the playlist [Playlist_Object] to the PMS. If playlist.plex_id is Adds the playlist [Playlist_Object] to the PMS. If playlist.id is
not None the existing Plex playlist will be overwritten; otherwise a new not None the existing Plex playlist will be overwritten; otherwise a new
playlist will be generated and stored accordingly in the playlist object. playlist will be generated and stored accordingly in the playlist object.

View file

@ -452,7 +452,7 @@ class Plex_DB_Functions():
answ = self.plexcursor.fetchone() answ = self.plexcursor.fetchone()
if not answ: if not answ:
return return
playlist.plex_id = answ[0] playlist.id = answ[0]
playlist.plex_name = answ[1] playlist.plex_name = answ[1]
playlist.plex_updatedat = answ[2] playlist.plex_updatedat = answ[2]
playlist.kodi_path = answ[3] playlist.kodi_path = answ[3]
@ -471,7 +471,7 @@ class Plex_DB_Functions():
VALUES (?, ?, ?, ?, ?, ?) VALUES (?, ?, ?, ?, ?, ?)
''' '''
self.plexcursor.execute(query, self.plexcursor.execute(query,
(playlist.plex_id, playlist.plex_name, (playlist.id, playlist.plex_name,
playlist.plex_updatedat, playlist.kodi_path, playlist.plex_updatedat, playlist.kodi_path,
playlist.kodi_type, playlist.kodi_hash)) playlist.kodi_type, playlist.kodi_hash))