todo, var name

This commit is contained in:
Blacktwin 2019-02-02 09:23:54 -05:00
parent c9c57352f4
commit e667d48f68

View File

@ -643,6 +643,7 @@ if __name__ == "__main__":
# Create user server objects # Create user server objects
if users: if users:
for user in users: for user in users:
# todo-me smart playlists will have to recreated in users server instance
if opts.action == 'share' and selected_playlists: if opts.action == 'share' and selected_playlists:
print("Sharing playlist(s)...") print("Sharing playlist(s)...")
share_playlists(selected_playlists, users) share_playlists(selected_playlists, users)
@ -666,19 +667,19 @@ if __name__ == "__main__":
if opts.action == 'show': if opts.action == 'show':
print("Displaying the user's playlist(s)...") print("Displaying the user's playlist(s)...")
for x in playlist_dict['data']: for data in playlist_dict['data']:
user = x['user'] user = data['user']
playlists = x['all_playlists'] playlists = data['all_playlists']
print("{}'s current playlist(s): {}".format(user, ', '.join(playlists))) print("{}'s current playlist(s): {}".format(user, ', '.join(playlists)))
exit() exit()
# Remove or build playlists # Remove or build playlists
if opts.action == 'remove': if opts.action == 'remove':
print("Deleting the playlist(s)...") print("Deleting the playlist(s)...")
for x in playlist_dict['data']: for data in playlist_dict['data']:
playlist_dict['server'] = x['server'] playlist_dict['server'] = data['server']
playlist_dict['user'] = x['user'] playlist_dict['user'] = data['user']
playlist_dict['user_selected'] = x['user_selected'] playlist_dict['user_selected'] = data['user_selected']
delete_playlist(playlist_dict, opts.jbop) delete_playlist(playlist_dict, opts.jbop)
else: else: