Rename function

This commit is contained in:
Croneter 2018-05-02 15:34:21 +02:00
parent e637f36a21
commit 61b0645314
4 changed files with 8 additions and 8 deletions

View file

@ -296,7 +296,7 @@ class KodiMonitor(xbmc.Monitor):
items.pop(0)
try:
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:
LOG.info('Could not build Plex playlist for: %s', items)

View file

@ -535,7 +535,7 @@ def add_listitem_to_playlist(playlist, pos, listitem, kodi_id=None,
if playlist.id is None:
init_plex_playqueue(playlist, plex_id, kodi_item)
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:
kodi_id = playlist.items[pos].kodi_id
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:
item = init_plex_playqueue(playlist, plex_id, kodi_item)
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 = {
'playlistid': playlist.playlistid,
'position': pos
@ -580,7 +580,7 @@ def add_item_to_playlist(playlist, pos, kodi_id=None, kodi_type=None,
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
side of things (e.g. because the user changed the Kodi side)

View file

@ -57,7 +57,7 @@ def create_plex_playlist(playlist=None, path=None):
if not PL.init_plex_playlist(playlist, plex_id):
return
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)
LOG.info('Done creating Plex %s playlist %s',
playlist.type, playlist.plex_name)

View file

@ -192,9 +192,9 @@ class PlayqueueMonitor(Thread):
PL.init_plex_playqueue(playqueue,
kodi_item=new_item)
else:
PL.add_item_to_PMS_playlist(playqueue,
i,
kodi_item=new_item)
PL.add_item_to_plex_playqueue(playqueue,
i,
kodi_item=new_item)
except PL.PlaylistError:
# Could not add the element
pass