Remove API method playlist_type()
This commit is contained in:
parent
6f6fb16352
commit
7b64b794f2
2 changed files with 2 additions and 8 deletions
|
@ -85,12 +85,6 @@ class API(object):
|
|||
"""
|
||||
return self.item.get('type')
|
||||
|
||||
def playlist_type(self):
|
||||
"""
|
||||
Returns the playlist type ('video', 'audio') or None
|
||||
"""
|
||||
return self.item.get('playlistType')
|
||||
|
||||
def updated_at(self):
|
||||
"""
|
||||
Returns the last time this item was updated as unicode, e.g.
|
||||
|
|
|
@ -87,7 +87,7 @@ def create_kodi_playlist(plex_id=None):
|
|||
api = API(xml[0])
|
||||
playlist = PL.Playlist_Object()
|
||||
playlist.id = api.plex_id()
|
||||
playlist.type = v.KODI_PLAYLIST_TYPE_FROM_PLEX[api.playlist_type()]
|
||||
playlist.type = v.KODI_PLAYLIST_TYPE_FROM_PLEX[xml.get('playlistType')]
|
||||
playlist.plex_name = api.title()
|
||||
playlist.plex_updatedat = api.updated_at()
|
||||
LOG.info('Creating new Kodi playlist from Plex playlist %s: %s',
|
||||
|
@ -289,7 +289,7 @@ def full_sync():
|
|||
for xml_playlist in xml:
|
||||
api = API(xml_playlist)
|
||||
if (not state.ENABLE_MUSIC and
|
||||
api.playlist_type() == v.PLEX_TYPE_AUDIO_PLAYLIST):
|
||||
xml.get('playlistType') == v.PLEX_TYPE_AUDIO_PLAYLIST):
|
||||
continue
|
||||
playlist = playlist_object_from_db(plex_id=api.plex_id())
|
||||
try:
|
||||
|
|
Loading…
Reference in a new issue