Rename function
This commit is contained in:
parent
e637f36a21
commit
61b0645314
4 changed files with 8 additions and 8 deletions
|
@ -296,7 +296,7 @@ class KodiMonitor(xbmc.Monitor):
|
||||||
items.pop(0)
|
items.pop(0)
|
||||||
try:
|
try:
|
||||||
for i, item in enumerate(items):
|
for i, item in enumerate(items):
|
||||||
PL.add_item_to_PMS_playlist(playqueue, i + 1, kodi_item=item)
|
PL.add_item_to_plex_playqueue(playqueue, i + 1, kodi_item=item)
|
||||||
except PL.PlaylistError:
|
except PL.PlaylistError:
|
||||||
LOG.info('Could not build Plex playlist for: %s', items)
|
LOG.info('Could not build Plex playlist for: %s', items)
|
||||||
|
|
||||||
|
|
|
@ -535,7 +535,7 @@ def add_listitem_to_playlist(playlist, pos, listitem, kodi_id=None,
|
||||||
if playlist.id is None:
|
if playlist.id is None:
|
||||||
init_plex_playqueue(playlist, plex_id, kodi_item)
|
init_plex_playqueue(playlist, plex_id, kodi_item)
|
||||||
else:
|
else:
|
||||||
add_item_to_PMS_playlist(playlist, pos, plex_id, kodi_item)
|
add_item_to_plex_playqueue(playlist, pos, plex_id, kodi_item)
|
||||||
if kodi_id is None and playlist.items[pos].kodi_id:
|
if kodi_id is None and playlist.items[pos].kodi_id:
|
||||||
kodi_id = playlist.items[pos].kodi_id
|
kodi_id = playlist.items[pos].kodi_id
|
||||||
kodi_type = playlist.items[pos].kodi_type
|
kodi_type = playlist.items[pos].kodi_type
|
||||||
|
@ -564,7 +564,7 @@ def add_item_to_playlist(playlist, pos, kodi_id=None, kodi_type=None,
|
||||||
if playlist.id is None:
|
if playlist.id is None:
|
||||||
item = init_plex_playqueue(playlist, plex_id, kodi_item)
|
item = init_plex_playqueue(playlist, plex_id, kodi_item)
|
||||||
else:
|
else:
|
||||||
item = add_item_to_PMS_playlist(playlist, pos, plex_id, kodi_item)
|
item = add_item_to_plex_playqueue(playlist, pos, plex_id, kodi_item)
|
||||||
params = {
|
params = {
|
||||||
'playlistid': playlist.playlistid,
|
'playlistid': playlist.playlistid,
|
||||||
'position': pos
|
'position': pos
|
||||||
|
@ -580,7 +580,7 @@ def add_item_to_playlist(playlist, pos, kodi_id=None, kodi_type=None,
|
||||||
return item
|
return item
|
||||||
|
|
||||||
|
|
||||||
def add_item_to_PMS_playlist(playlist, pos, plex_id=None, kodi_item=None):
|
def add_item_to_plex_playqueue(playlist, pos, plex_id=None, kodi_item=None):
|
||||||
"""
|
"""
|
||||||
Adds a new item to the playlist at position pos [int] only on the Plex
|
Adds a new item to the playlist at position pos [int] only on the Plex
|
||||||
side of things (e.g. because the user changed the Kodi side)
|
side of things (e.g. because the user changed the Kodi side)
|
||||||
|
|
|
@ -57,7 +57,7 @@ def create_plex_playlist(playlist=None, path=None):
|
||||||
if not PL.init_plex_playlist(playlist, plex_id):
|
if not PL.init_plex_playlist(playlist, plex_id):
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
PL.add_item_to_PMS_playlist(playlist, pos, plex_id=plex_id)
|
PL.add_item_to_plex_playqueue(playlist, pos, plex_id=plex_id)
|
||||||
update_plex_table(playlist, update_kodi_hash=True)
|
update_plex_table(playlist, update_kodi_hash=True)
|
||||||
LOG.info('Done creating Plex %s playlist %s',
|
LOG.info('Done creating Plex %s playlist %s',
|
||||||
playlist.type, playlist.plex_name)
|
playlist.type, playlist.plex_name)
|
||||||
|
|
|
@ -192,9 +192,9 @@ class PlayqueueMonitor(Thread):
|
||||||
PL.init_plex_playqueue(playqueue,
|
PL.init_plex_playqueue(playqueue,
|
||||||
kodi_item=new_item)
|
kodi_item=new_item)
|
||||||
else:
|
else:
|
||||||
PL.add_item_to_PMS_playlist(playqueue,
|
PL.add_item_to_plex_playqueue(playqueue,
|
||||||
i,
|
i,
|
||||||
kodi_item=new_item)
|
kodi_item=new_item)
|
||||||
except PL.PlaylistError:
|
except PL.PlaylistError:
|
||||||
# Could not add the element
|
# Could not add the element
|
||||||
pass
|
pass
|
||||||
|
|
Loading…
Reference in a new issue