From 9b4aafcacccf08dbdf5ec02a06772b1ccb693c0c Mon Sep 17 00:00:00 2001 From: James Taylor Date: Sat, 10 Nov 2018 21:58:01 -0800 Subject: post/redirect/get for removing items from playlist --- youtube/youtube.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'youtube/youtube.py') diff --git a/youtube/youtube.py b/youtube/youtube.py index 0701beb..74d03e9 100644 --- a/youtube/youtube.py +++ b/youtube/youtube.py @@ -88,10 +88,9 @@ def youtube(env, start_response): if fields['action'][0] == 'remove': playlist_name = path[11:] local_playlist.remove_from_playlist(playlist_name, fields['video_info_list']) - start_response('200 OK', ()) + start_response('303 See Other', (('Location', common.URL_ORIGIN + path),) ) return local_playlist.get_playlist_page(playlist_name).encode() - start_response('200 OK', (('Content-type','text/html'),) ) - return local_playlist.get_playlist_page(path[10:], query_string=query_string).encode() + else: start_response('400 Bad Request', ()) return b'400 Bad Request' -- cgit v1.2.3