From 31a60602de1a587a6e84b6bca340fb71241a2187 Mon Sep 17 00:00:00 2001 From: James Taylor Date: Sat, 5 Jan 2019 01:23:04 -0800 Subject: WSGI for /edit_playlist --- youtube/local_playlist.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'youtube/local_playlist.py') diff --git a/youtube/local_playlist.py b/youtube/local_playlist.py index 715015e..0ee76be 100644 --- a/youtube/local_playlist.py +++ b/youtube/local_playlist.py @@ -144,3 +144,12 @@ def get_playlist_page(url, query_string=''): else: return get_local_playlist_page(url) + +def edit_playlist(env, start_response): + fields = env['fields'] + if fields['action'][0] == 'add': + add_to_playlist(fields['playlist_name'][0], fields['video_info_list']) + start_response('204 No Content', ()) + else: + start_response('400 Bad Request', ()) + return b'400 Bad Request' \ No newline at end of file -- cgit v1.2.3