Rename function
This commit is contained in:
parent
6c3c9a4f93
commit
ba0aff0f54
4 changed files with 7 additions and 6 deletions
|
@ -384,7 +384,7 @@ class KodiMonitor(xbmc.Monitor):
|
|||
LOG.debug('No Plex id obtained - aborting playback report')
|
||||
state.PLAYER_STATES[playerid] = copy.deepcopy(state.PLAYSTATE)
|
||||
return
|
||||
item = PL.init_Plex_playlist(playqueue, plex_id=plex_id)
|
||||
item = PL.init_plex_playqueue(playqueue, plex_id=plex_id)
|
||||
# Set the Plex container key (e.g. using the Plex playqueue)
|
||||
container_key = None
|
||||
if info['playlistid'] != -1:
|
||||
|
|
|
@ -207,7 +207,7 @@ def _init_existing_kodi_playlist(playqueue, pos):
|
|||
kodi_items = js.playlist_get_items(playqueue.playlistid)
|
||||
if not kodi_items:
|
||||
raise PL.PlaylistError('No Kodi items returned')
|
||||
item = PL.init_Plex_playlist(playqueue, kodi_item=kodi_items[pos])
|
||||
item = PL.init_plex_playqueue(playqueue, kodi_item=kodi_items[pos])
|
||||
item.force_transcode = state.FORCE_TRANSCODE
|
||||
# playqueue.py will add the rest - this will likely put the PMS under
|
||||
# a LOT of strain if the following Kodi setting is enabled:
|
||||
|
|
|
@ -456,7 +456,7 @@ def update_playlist_from_PMS(playlist, playlist_id=None, xml=None):
|
|||
playlist.items.append(playlist_item)
|
||||
|
||||
|
||||
def init_Plex_playlist(playlist, plex_id=None, kodi_item=None):
|
||||
def init_plex_playqueue(playlist, plex_id=None, kodi_item=None):
|
||||
"""
|
||||
Initializes the Plex side without changing the Kodi playlists
|
||||
WILL ALSO UPDATE OUR PLAYLISTS.
|
||||
|
@ -503,7 +503,7 @@ def add_listitem_to_playlist(playlist, pos, listitem, kodi_id=None,
|
|||
'%s', pos, playlist)
|
||||
kodi_item = {'id': kodi_id, 'type': kodi_type, 'file': file}
|
||||
if playlist.id is None:
|
||||
init_Plex_playlist(playlist, plex_id, kodi_item)
|
||||
init_plex_playqueue(playlist, plex_id, kodi_item)
|
||||
else:
|
||||
add_item_to_PMS_playlist(playlist, pos, plex_id, kodi_item)
|
||||
if kodi_id is None and playlist.items[pos].kodi_id:
|
||||
|
@ -532,7 +532,7 @@ def add_item_to_playlist(playlist, pos, kodi_id=None, kodi_type=None,
|
|||
LOG.debug('add_item_to_playlist. Playlist before adding: %s', playlist)
|
||||
kodi_item = {'id': kodi_id, 'type': kodi_type, 'file': file}
|
||||
if playlist.id is None:
|
||||
item = init_Plex_playlist(playlist, plex_id, kodi_item)
|
||||
item = init_plex_playqueue(playlist, plex_id, kodi_item)
|
||||
else:
|
||||
item = add_item_to_PMS_playlist(playlist, pos, plex_id, kodi_item)
|
||||
params = {
|
||||
|
|
|
@ -189,7 +189,8 @@ class PlayqueueMonitor(Thread):
|
|||
with LOCK:
|
||||
try:
|
||||
if playqueue.id is None:
|
||||
PL.init_Plex_playlist(playqueue, kodi_item=new_item)
|
||||
PL.init_plex_playqueue(playqueue,
|
||||
kodi_item=new_item)
|
||||
else:
|
||||
PL.add_item_to_PMS_playlist(playqueue,
|
||||
i,
|
||||
|
|
Loading…
Reference in a new issue