From e667d48f68cd9f280fc0c0efa8dfab10fde78760 Mon Sep 17 00:00:00 2001 From: Blacktwin Date: Sat, 2 Feb 2019 09:23:54 -0500 Subject: [PATCH] todo, var name --- fun/playlist_manager.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/fun/playlist_manager.py b/fun/playlist_manager.py index f3fe532..0c814a5 100644 --- a/fun/playlist_manager.py +++ b/fun/playlist_manager.py @@ -643,6 +643,7 @@ if __name__ == "__main__": # Create user server objects if users: for user in users: + # todo-me smart playlists will have to recreated in users server instance if opts.action == 'share' and selected_playlists: print("Sharing playlist(s)...") share_playlists(selected_playlists, users) @@ -666,19 +667,19 @@ if __name__ == "__main__": if opts.action == 'show': print("Displaying the user's playlist(s)...") - for x in playlist_dict['data']: - user = x['user'] - playlists = x['all_playlists'] + for data in playlist_dict['data']: + user = data['user'] + playlists = data['all_playlists'] print("{}'s current playlist(s): {}".format(user, ', '.join(playlists))) exit() # Remove or build playlists if opts.action == 'remove': print("Deleting the playlist(s)...") - for x in playlist_dict['data']: - playlist_dict['server'] = x['server'] - playlist_dict['user'] = x['user'] - playlist_dict['user_selected'] = x['user_selected'] + for data in playlist_dict['data']: + playlist_dict['server'] = data['server'] + playlist_dict['user'] = data['user'] + playlist_dict['user_selected'] = data['user_selected'] delete_playlist(playlist_dict, opts.jbop) else: