show no longer needs allPlaylists to view user's playlist.

This commit is contained in:
Blacktwin 2019-01-05 18:10:57 -05:00
parent b5c7261c3b
commit 3d632aa65e

View File

@ -648,12 +648,13 @@ if __name__ == "__main__":
share_playlists(server_playlists, users) share_playlists(server_playlists, users)
user_acct = account.user(user) user_acct = account.user(user)
user_server = PlexServer(PLEX_URL, user_acct.get_token(plex.machineIdentifier)) user_server = PlexServer(PLEX_URL, user_acct.get_token(plex.machineIdentifier))
user_playlists = [pl.title for pl in user_server.playlists()] all_playlists = [pl.title for pl in user_server.playlists()]
user_playlists = exclusions(opts.allPlaylists, opts.playlists, user_playlists) user_playlists = exclusions(opts.allPlaylists, opts.playlists, all_playlists)
plex_servers.append({ plex_servers.append({
'server': user_server, 'server': user_server,
'user': user, 'user': user,
'user_playlists': user_playlists}) 'user_playlists': user_playlists,
'all_playlists': all_playlists})
if opts.self: if opts.self:
plex_servers.append({'server': plex, plex_servers.append({'server': plex,
'user': 'admin', 'user': 'admin',
@ -669,7 +670,7 @@ if __name__ == "__main__":
print("Displaying the user's playlist(s)...") print("Displaying the user's playlist(s)...")
for x in playlist_dict['data']: for x in playlist_dict['data']:
user = x['user'] user = x['user']
playlists = x['user_playlists'] playlists = x['all_playlists']
print("{}'s current playlist(s): {}".format(user, ', '.join(playlists))) print("{}'s current playlist(s): {}".format(user, ', '.join(playlists)))
exit() exit()