aboutsummaryrefslogtreecommitdiffstats
path: root/youtube/local_playlist.py
diff options
context:
space:
mode:
authorJames Taylor <user234683@users.noreply.github.com>2019-01-05 01:23:04 -0800
committerJames Taylor <user234683@users.noreply.github.com>2019-01-05 01:23:04 -0800
commit31a60602de1a587a6e84b6bca340fb71241a2187 (patch)
tree03aede56f900ff82e81e703484247ae680828325 /youtube/local_playlist.py
parenta57fc774260f2940449880ec9b6aaf40fa2776c3 (diff)
downloadyt-local-31a60602de1a587a6e84b6bca340fb71241a2187.tar.lz
yt-local-31a60602de1a587a6e84b6bca340fb71241a2187.tar.xz
yt-local-31a60602de1a587a6e84b6bca340fb71241a2187.zip
WSGI for /edit_playlist
Diffstat (limited to 'youtube/local_playlist.py')
-rw-r--r--youtube/local_playlist.py9
1 files changed, 9 insertions, 0 deletions
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