aboutsummaryrefslogtreecommitdiffstats
path: root/youtube
diff options
context:
space:
mode:
authorJames Taylor <user234683@users.noreply.github.com>2018-11-10 21:58:01 -0800
committerJames Taylor <user234683@users.noreply.github.com>2018-11-10 21:58:01 -0800
commit9b4aafcacccf08dbdf5ec02a06772b1ccb693c0c (patch)
treef3930737e60f33ae6af38b38822c34263210021d /youtube
parent409fea01971c13eae62109f1b8afc01b94960beb (diff)
downloadyt-local-9b4aafcacccf08dbdf5ec02a06772b1ccb693c0c.tar.lz
yt-local-9b4aafcacccf08dbdf5ec02a06772b1ccb693c0c.tar.xz
yt-local-9b4aafcacccf08dbdf5ec02a06772b1ccb693c0c.zip
post/redirect/get for removing items from playlist
Diffstat (limited to 'youtube')
-rw-r--r--youtube/youtube.py5
1 files changed, 2 insertions, 3 deletions
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'