diff options
author | Biswakalyan Bhuyan <biswa@surgot.in> | 2024-09-19 15:33:11 +0530 |
---|---|---|
committer | Biswakalyan Bhuyan <biswa@surgot.in> | 2024-09-19 15:33:11 +0530 |
commit | a4e01da27c08e43a67b2618ad1e71c1f8f86d5cd (patch) | |
tree | 5b8f407dbb7e9d1ab2106ac0cc8564897e7a2098 /youtube/templates/local_playlist.html | |
download | yt-local-a4e01da27c08e43a67b2618ad1e71c1f8f86d5cd.tar.gz yt-local-a4e01da27c08e43a67b2618ad1e71c1f8f86d5cd.tar.bz2 yt-local-a4e01da27c08e43a67b2618ad1e71c1f8f86d5cd.zip |
Diffstat (limited to 'youtube/templates/local_playlist.html')
-rw-r--r-- | youtube/templates/local_playlist.html | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/youtube/templates/local_playlist.html b/youtube/templates/local_playlist.html new file mode 100644 index 0000000..3286f67 --- /dev/null +++ b/youtube/templates/local_playlist.html @@ -0,0 +1,49 @@ +{% set page_title = playlist_name + ' - Local playlist' %} +{% extends "base.html" %} +{% import "common_elements.html" as common_elements %} +{% block style %} + <link href="/youtube.com/static/message_box.css" rel="stylesheet"> + <link href="/youtube.com/static/local_playlist.css" rel="stylesheet"> +{% endblock style %} + +{% block main %} + <div class="playlist-metadata"> + <h2 class="play-title">{{ playlist_name }}</h2> + + <div id="export-options"> + <form id="playlist-export" method="post"> + <select id="export-type" name="export_format"> + <option value="json">JSON</option> + <option value="ids">Video id list (txt)</option> + <option value="urls">Video url list (txt)</option> + </select> + <button type="submit" id="playlist-export-button" name="action" value="export">Export</button> + </form> + </div> + </div> + + <form id="playlist-remove" action="/youtube.com/edit_playlist" method="post" target="_self"></form> + <div class="playlist-metadata" id="video-remove-container"> + <button id="removePlayList" type="submit" name="action" value="remove_playlist" form="playlist-remove" formaction="">Remove playlist</button> + <input type="hidden" name="playlist_page" value="{{ playlist_name }}" form="playlist-edit"> + <button class="play-action" type="submit" id="playlist-remove-button" name="action" value="remove" form="playlist-edit" formaction="">Remove from playlist</button> + </div> + <div id="results" class="video-container"> + {% for video_info in videos %} + {{ common_elements.item(video_info) }} + {% endfor %} + </div> + <script> + // @license magnet:?xt=urn:btih:1f739d935676111cfff4b4693e3816e664797050&dn=gpl-3.0.txt GPL-v3-or-Later + const deletePlayList = document.getElementById('removePlayList'); + deletePlayList.addEventListener('click', (event) => { + return confirm('You are about to permanently delete {{ playlist_name }}\n\nOnce a playlist is permanently deleted, it cannot be recovered.') + }); + // @license-end + </script> + <footer class="pagination-container"> + <nav class="pagination-list"> + {{ common_elements.page_buttons(num_pages, '/https://www.youtube.com/playlists/' + playlist_name, parameters_dictionary) }} + </nav> + </footer> +{% endblock main %} |