aboutsummaryrefslogtreecommitdiffstats
path: root/youtube/local_playlist.py
diff options
context:
space:
mode:
authorJames Taylor <user234683@users.noreply.github.com>2019-01-06 01:33:52 -0800
committerJames Taylor <user234683@users.noreply.github.com>2019-01-06 01:33:52 -0800
commitbb2d40ac83f222678ed5b4265355b9f146f2ba3e (patch)
tree836262b08777a3ad9e23c700d1c4f81d45ffe73c /youtube/local_playlist.py
parenteea16e5ac32696ea711fbc3846c113ccdfd2928b (diff)
downloadyt-local-bb2d40ac83f222678ed5b4265355b9f146f2ba3e.tar.lz
yt-local-bb2d40ac83f222678ed5b4265355b9f146f2ba3e.tar.xz
yt-local-bb2d40ac83f222678ed5b4265355b9f146f2ba3e.zip
rename env['fields'] to env['parameters'] and rename fields to parameters in general
Diffstat (limited to 'youtube/local_playlist.py')
-rw-r--r--youtube/local_playlist.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/youtube/local_playlist.py b/youtube/local_playlist.py
index 4d85a1f..f25e826 100644
--- a/youtube/local_playlist.py
+++ b/youtube/local_playlist.py
@@ -147,10 +147,10 @@ def get_playlist_page(env, start_response):
def path_edit_playlist(env, start_response):
'''Called when making changes to the playlist from that playlist's page'''
- fields = env['fields']
- if fields['action'][0] == 'remove':
+ parameters = env['parameters']
+ if parameters['action'][0] == 'remove':
playlist_name = env['path_parts'][1]
- remove_from_playlist(playlist_name, fields['video_info_list'])
+ remove_from_playlist(playlist_name, parameters['video_info_list'])
start_response('303 See Other', [('Location', common.URL_ORIGIN + env['PATH_INFO']),] )
return b''
@@ -160,9 +160,9 @@ def path_edit_playlist(env, start_response):
def edit_playlist(env, start_response):
'''Called when adding videos to a playlist from elsewhere'''
- fields = env['fields']
- if fields['action'][0] == 'add':
- add_to_playlist(fields['playlist_name'][0], fields['video_info_list'])
+ parameters = env['parameters']
+ if parameters['action'][0] == 'add':
+ add_to_playlist(parameters['playlist_name'][0], parameters['video_info_list'])
start_response('204 No Content', ())
else:
start_response('400 Bad Request', ())