local_playlist.html 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. {% set page_title = playlist_name + ' - Local playlist' %}
  2. {% extends "base.html" %}
  3. {% import "common_elements.html" as common_elements %}
  4. {% block style %}
  5. <link href="/youtube.com/static/message_box.css" rel="stylesheet">
  6. <link href="/youtube.com/static/local_playlist.css" rel="stylesheet">
  7. {% endblock style %}
  8. {% block main %}
  9. <div class="playlist-metadata">
  10. <h2 class="play-title">{{ playlist_name }}</h2>
  11. <div id="export-options">
  12. <form id="playlist-export" method="post">
  13. <select id="export-type" name="export_format">
  14. <option value="json">JSON</option>
  15. <option value="ids">Video id list (txt)</option>
  16. <option value="urls">Video url list (txt)</option>
  17. </select>
  18. <button type="submit" id="playlist-export-button" name="action" value="export">Export</button>
  19. </form>
  20. </div>
  21. </div>
  22. <form id="playlist-remove" action="/youtube.com/edit_playlist" method="post" target="_self"></form>
  23. <div class="playlist-metadata" id="video-remove-container">
  24. <button id="removePlayList" type="submit" name="action" value="remove_playlist" form="playlist-remove" formaction="">Remove playlist</button>
  25. <input type="hidden" name="playlist_page" value="{{ playlist_name }}" form="playlist-edit">
  26. <button class="play-action" type="submit" id="playlist-remove-button" name="action" value="remove" form="playlist-edit" formaction="">Remove from playlist</button>
  27. </div>
  28. <div id="results" class="video-container">
  29. {% for video_info in videos %}
  30. {{ common_elements.item(video_info) }}
  31. {% endfor %}
  32. </div>
  33. <script>
  34. // @license magnet:?xt=urn:btih:1f739d935676111cfff4b4693e3816e664797050&dn=gpl-3.0.txt GPL-v3-or-Later
  35. const deletePlayList = document.getElementById('removePlayList');
  36. deletePlayList.addEventListener('click', (event) => {
  37. return confirm('You are about to permanently delete {{ playlist_name }}\n\nOnce a playlist is permanently deleted, it cannot be recovered.')
  38. });
  39. // @license-end
  40. </script>
  41. <footer class="pagination-container">
  42. <nav class="pagination-list">
  43. {{ common_elements.page_buttons(num_pages, '/https://www.youtube.com/playlists/' + playlist_name, parameters_dictionary) }}
  44. </nav>
  45. </footer>
  46. {% endblock main %}