diff options
author | James Taylor <user234683@users.noreply.github.com> | 2018-07-08 01:06:54 -0700 |
---|---|---|
committer | James Taylor <user234683@users.noreply.github.com> | 2018-07-08 01:06:54 -0700 |
commit | 6ad09eb53a8b79b2241f56009d9757f8cac7181f (patch) | |
tree | bbdad0456c1dc202fe8c93e9f1a521c8db06fec3 /youtube/local_playlist.py | |
parent | f36c1d26a40a31cbf1de9cbdb8451f84c4eb01c6 (diff) | |
download | yt-local-6ad09eb53a8b79b2241f56009d9757f8cac7181f.tar.lz yt-local-6ad09eb53a8b79b2241f56009d9757f8cac7181f.tar.xz yt-local-6ad09eb53a8b79b2241f56009d9757f8cac7181f.zip |
server-side support for adding to local playlists
Diffstat (limited to 'youtube/local_playlist.py')
-rw-r--r-- | youtube/local_playlist.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/youtube/local_playlist.py b/youtube/local_playlist.py new file mode 100644 index 0000000..057555a --- /dev/null +++ b/youtube/local_playlist.py @@ -0,0 +1,13 @@ +import os.path +import json + +playlists_directory = os.path.normpath("data/playlists") + +def add_to_playlist(name, video_info_list): + with open(os.path.join(playlists_directory, name), "a", encoding='utf-8') as file: + for info in video_info_list: + file.write(info + "\n") + + +def get_playlist_page(name): + pass
\ No newline at end of file |