server-side support for adding to local playlists
This commit is contained in:
13
youtube/local_playlist.py
Normal file
13
youtube/local_playlist.py
Normal file
@@ -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
|
||||
Reference in New Issue
Block a user