view_playlist.html 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488
  1. {% extends 'base.html' %}
  2. {% load humanize %}
  3. {% load static %}
  4. {% block content %}
  5. <div id="view_playlist">
  6. {% if playlist.has_playlist_changed %}
  7. <div hx-get="{% url 'update_playlist' playlist.playlist_id 'auto' %}" hx-trigger="load" hx-swap="outerHTML">
  8. <div class="d-flex justify-content-center mt-4 mb-3" id="loading-sign">
  9. <img src="{% static 'svg-loaders/circles.svg' %}" width="40" height="40">
  10. <h5 class="mt-2 ms-2">Updating playlist '{{ playlist.name }}', please wait!</h5>
  11. </div>
  12. </div>
  13. {% else %}
  14. <div class="sticky-top mb-3" style="top: 0.5rem;">
  15. <div hx-get="{% url 'update_playlist' playlist.playlist_id 'checkforupdates' %}" hx-trigger="load" hx-swap="outerHTML" id="checkforupdates">
  16. </div>
  17. {% if playlist.marked_as == "watching" %}
  18. <div id="playlist-watch-message">
  19. {% include 'intercooler/playlist_watch_message.html' %}
  20. </div>
  21. {% endif %}
  22. </div>
  23. <div class="list-group-item list-group-item-action active">
  24. <div class="d-flex w-100 justify-content-between">
  25. <span>
  26. <h2 class="mb-1"><a href="https://www.youtube.com/playlist?list={{ playlist.playlist_id }}" target="_blank" style="color: white; text-decoration: none">{{ playlist.name }}</a> <small>{% if playlist.user_label %}<span class="h3" style="border-bottom: 3px #ffffff dashed;">a.k.a {{ playlist.user_label }}</span>{% endif %}</small>
  27. <small>
  28. <input class="form-control me-1 visually-hidden" id="pl-{{ playlist.playlist_id }}" value="{{ playlist.playlist_id }}">
  29. <button class="copy-btn btn btn-light mb-1" data-clipboard-target="#pl-{{ playlist.playlist_id }}">
  30. <i class="far fa-copy" aria-hidden="true"></i>
  31. </button>
  32. </small> </h2>
  33. <h6>by {{ playlist.channel_name }}</h6>
  34. </span>
  35. <h4>
  36. <span id="notice-div">
  37. {% if playlist.marked_as != "none" %}
  38. <span class="badge bg-success text-white" >
  39. {% if playlist.marked_as == "watching" %}
  40. <i class="fas fa-fire-alt me-1"></i>
  41. {% elif playlist.marked_as == "plan-to-watch"%}
  42. <i class="fas fa-flag me-1"></i>
  43. {% endif %}
  44. {{ playlist.marked_as }}
  45. </span>
  46. {% endif %}
  47. </span>
  48. </h4>
  49. </div>
  50. <p class="mb-1">
  51. {% if playlist.description %}
  52. <h5>{{ playlist.description|truncatewords:"50"|linebreaksbr }}</h5>
  53. {% else %}
  54. <h5>No description</h5>
  55. {% endif %}
  56. </p>
  57. <h6 class="h6 text-uppercase">
  58. <span class="badge bg-light text-black-50">{% if playlist.is_user_owned %}OWNED{% else %}IMPORTED{% endif %}</span>
  59. <span class="badge bg-light text-black-50">{{ playlist.video_count }} VIDEOS</span>
  60. <span class="badge bg-light text-black-50">{{ playlist.playlist_duration }} </span>
  61. <span class="badge bg-light text-black-50">{% if playlist.is_private_on_yt %}PRIVATE{% else %}PUBLIC{% endif %}</span>
  62. {% if playlist.has_unavailable_videos %}
  63. <span class="badge bg-light text-black-50">SOME VIDEOS ARE UNAVAILABLE</span>
  64. {% endif %}
  65. {% if playlist.has_duplicate_videos %}
  66. <span class="badge bg-light text-black-50">DUPLICATE VIDEOS</span>
  67. {% endif %}
  68. </h6>
  69. <h6 class="h6 pt-1">
  70. Tags:
  71. <span class="text-uppercase">
  72. <span id="playlist-tags">
  73. {% for tag in playlist_tags %}
  74. <span id="tag-{{ tag.name|slugify }}">
  75. <span class="badge rounded-pill bg-info mb-lg-1">
  76. <a href="{% url 'tagged_playlists' tag.name %}" style="text-decoration: none; color: white">{{ tag.name }} </a>
  77. <a class="ms-1" hx-post="{% url 'remove_playlist_tag' playlist.playlist_id tag.name %}" hx-trigger="click" hx-target="#tag-{{ tag.name|slugify }}"><i class="fas fa-times-circle"></i></a></span>
  78. </span>
  79. {% endfor %}
  80. </span>
  81. <a data-bs-toggle="collapse" href="#addTagsCollapse" role="button" aria-expanded="false" aria-controls="addTagsCollapse">
  82. <span class="badge rounded-pill bg-warning mb-lg-2"><i class="fas fa-plus"></i>{% if playlist_tags.count == 0 %} add a tag{% endif %}</span>
  83. </a>
  84. </span>
  85. <div class="collapse" id="addTagsCollapse">
  86. <div class="card card-body bg-dark text-white">
  87. <h5>Add a tag to this playlist</h5>
  88. {% if unused_tags %}
  89. <div class="d-flex justify-content-start mt-2">
  90. <select class="form-select w-50 bg-dark text-white border border-secondary" name="playlistTag" hx-get="{% url 'get_unused_playlist_tags' playlist.playlist_id %}" hx-trigger="click" hx-target="#unused-playlist-tags">
  91. <option selected>Pick from existing unused tags</option>
  92. <span id="unused-playlist-tags">
  93. {% for tag in unused_tags %}
  94. <option value="{{ tag.name }}">{{ tag.name }}</option>
  95. {% endfor %}
  96. </span>
  97. </select>
  98. <div class="btn-group ms-2">
  99. <button type="button" class="btn btn-warning" hx-post="{% url 'add_playlist_tag' playlist.playlist_id %}" hx-trigger="click" hx-include="[name='playlistTag']" hx-target="this">Add Tag</button>
  100. </div>
  101. </div>
  102. <div class="d-flex justify-content-start mt-3 mb-2">
  103. - OR -
  104. </div>
  105. {% endif %}
  106. <div class="d-flex justify-content-start mt-2">
  107. <input class="form-control w-50 bg-dark text-white border border-secondary" placeholder="Enter a new tag name here" name="createTagField">
  108. <div class="btn-group ms-2">
  109. <button type="button" class="btn btn-warning" hx-post="{% url 'create_playlist_tag' playlist.playlist_id %}" hx-trigger="click" hx-include="[name='createTagField']" hx-target="this">Create & Add Tag</button>
  110. </div>
  111. </div>
  112. </div>
  113. </div>
  114. </h6>
  115. </div>
  116. <br>
  117. <div id="row1">
  118. <div class="d-flex bd-highlight mb-1">
  119. <div class="me-auto bd-highlight">
  120. <div class="btn-toolbar mb-2 mb-md-0">
  121. <!--
  122. <div class="btn-group me-2">
  123. <button type="button" class="btn {% if playlist.view_in_grid_mode %}btn-info {% else %}btn-outline-info{% endif %}">Grid</button>
  124. <button type="button" class="btn {% if not playlist.view_in_grid_mode %}btn-info {% else %}btn-outline-info{% endif %}">List</button>
  125. </div>
  126. -->
  127. {% if videos.count != 0 %}
  128. <div class="btn-group me-2">
  129. <button type="button" class="btn btn-success dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
  130. Sort By
  131. </button>
  132. <ul class="dropdown-menu">
  133. <li><button class="dropdown-item" hx-get="{% url 'order_playlist_by' playlist.playlist_id 'all' %}" hx-trigger="click" hx-target="#videos-div">All</button></li>
  134. <li><button class="dropdown-item" hx-get="{% url 'order_playlist_by' playlist.playlist_id 'favorites' %}" hx-trigger="click" hx-target="#videos-div">Favorites</button></li>
  135. <li><button class="dropdown-item" hx-get="{% url 'order_playlist_by' playlist.playlist_id 'popularity' %}" hx-trigger="click" hx-target="#videos-div">Popularity</button></li>
  136. <li><button class="dropdown-item" hx-get="{% url 'order_playlist_by' playlist.playlist_id 'date-published' %}" hx-trigger="click" hx-target="#videos-div">Date Published</button></li>
  137. <li><button class="dropdown-item" hx-get="{% url 'order_playlist_by' playlist.playlist_id 'views' %}" hx-trigger="click" hx-target="#videos-div">Views</button></li>
  138. <li><button class="dropdown-item" hx-get="{% url 'order_playlist_by' playlist.playlist_id 'has-cc' %}" hx-trigger="click" hx-target="#videos-div">Has CC</button></li>
  139. <li><button class="dropdown-item" hx-get="{% url 'order_playlist_by' playlist.playlist_id 'duration' %}" hx-trigger="click" hx-target="#videos-div">Duration</button></li>
  140. <li><hr class="dropdown-divider"></li>
  141. <li><button class="dropdown-item" hx-get="{% url 'order_playlist_by' playlist.playlist_id 'new-updates' %}" hx-trigger="click" hx-target="#videos-div">Updates</button></li>
  142. <li><button class="dropdown-item" hx-get="{% url 'order_playlist_by' playlist.playlist_id 'unavailable-videos' %}" hx-trigger="click" hx-target="#videos-div">Unavailable</button></li>
  143. </ul>
  144. </div>
  145. {% endif %}
  146. <div class="btn-group me-2">
  147. <button type="button" class="btn btn-warning dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
  148. Mark As
  149. </button>
  150. <ul class="dropdown-menu">
  151. <li><button class="dropdown-item" hx-get="{% url 'mark_playlist_as' playlist.playlist_id 'none' %}" hx-trigger="click" hx-target="#notice-div">None</button></li>
  152. <li><button class="dropdown-item" hx-get="{% url 'mark_playlist_as' playlist.playlist_id 'watching' %}" hx-trigger="click" hx-target="#notice-div">Watching</button></li>
  153. <li><button class="dropdown-item" hx-get="{% url 'mark_playlist_as' playlist.playlist_id 'plan-to-watch' %}" hx-trigger="click" hx-target="#notice-div">Plan to Watch</button></li>
  154. </ul>
  155. </div>
  156. </div>
  157. </div>
  158. <div class="bd-highlight">
  159. <div class="btn-toolbar mb-2 mb-md-0">
  160. <div class="btn-group me-2">
  161. <a hx-get="{% url 'update_playlist' playlist.playlist_id 'manual' %}" hx-target="#view_playlist" class="btn btn-secondary">
  162. <i class="fas fa-sync"></i>
  163. </a>
  164. </div>
  165. <div class="btn-group me-2">
  166. <button class="btn btn-warning" type="button" hx-get="{% url 'mark_playlist_as' playlist.playlist_id 'favorite' %}" hx-target="#playlist-fav">
  167. <div id="playlist-fav">
  168. {% if playlist.is_favorite %}
  169. <i class="fas fa-star"></i>
  170. {% else %}
  171. <i class="far fa-star"></i>
  172. {% endif %}
  173. </div>
  174. </button>
  175. </div>
  176. <div class="btn-group me-2">
  177. <a href="{% url 'view_playlist_settings' playlist.playlist_id %}" class="btn btn-primary">
  178. <i class="fas fa-cog"></i>
  179. </a>
  180. </div>
  181. {% if videos.count != 0 %}
  182. <div class="btn-group me-2">
  183. <button type="button" class="btn btn-light" onclick="row1_hide()">Manage</button>
  184. </div>
  185. {% endif %}
  186. </div>
  187. </div>
  188. </div>
  189. </div>
  190. <div id="row2" style="display: none">
  191. <div class="d-flex bd-highlight mb-1">
  192. <div class="me-auto bd-highlight">
  193. <div class="btn-toolbar mb-2 mb-md-0">
  194. <div id="select-all-btn">
  195. <div class="btn-group me-2">
  196. <button type="button" class="btn btn-info" id="select-all-btn">Select All</button>
  197. </div>
  198. </div>
  199. <div id="deselect-all-btn" style="display: none">
  200. <div class="btn-group me-2">
  201. <button type="button" class="btn btn-info" id="select-all-btn">De-select All</button>
  202. </div>
  203. </div>
  204. <div class="btn-group me-2">
  205. <!-- <button type="submit" form="my-form" class="btn btn-outline-success" data-bs-toggle="dropdown" aria-expanded="false">
  206. Move
  207. </button> -->
  208. <button class="btn btn-success" id="move-copy-vids-btn" type="button" data-bs-toggle="collapse" data-bs-target="#moveItemsToCollapse" aria-expanded="false" aria-controls="moveItemsToCollapse">
  209. {% if playlist.is_user_owned %}Move/{% endif %}Copy Videos
  210. </button>
  211. </div>
  212. <!--
  213. <div class="btn-group me-2">
  214. <button type="button" class="btn btn-outline-warning" data-bs-toggle="dropdown" aria-expanded="false">
  215. Mark/Unmark Favorite
  216. </button>
  217. </div>
  218. -->
  219. {% if playlist.is_user_owned %}
  220. <div class="btn-group me-2">
  221. <button hx-post="{% url 'delete_videos' playlist.playlist_id 'confirm' %}" hx-include="[id='video-checkboxes']" hx-target="#delete-videos-confirm-box" type="button" id="delete-vids-btn" class="btn btn-danger" data-bs-toggle="collapse" data-bs-target="#deleteItemsCollapse" aria-expanded="false" aria-controls="deleteItemsCollapse">
  222. Delete Selected Videos
  223. </button>
  224. </div>
  225. {% endif %}
  226. </div>
  227. </div>
  228. <div class="bd-highlight">
  229. <div class="btn-toolbar mb-2 mb-md-0">
  230. <div class="btn-group me-2">
  231. <button type="button" class="btn btn-light" onclick="row1_show()" id="manageBtn">Manage</button>
  232. </div>
  233. </div>
  234. </div>
  235. </div>
  236. </div>
  237. <div id="row3" style="background-color: #0f5132">
  238. <div class="collapse border-danger" id="moveItemsToCollapse">
  239. <div class="card card-body bg-dark text-white">
  240. <h5>{% if playlist.is_user_owned %}Move or {% endif %}Copy videos to another playlist!</h5>
  241. <div class="d-flex justify-content-start">
  242. <div class="col-md-7 text-dark">
  243. <select class="visually-hidden" onchange="triggerSubmit()"
  244. id="choices-multiple-remove-button" name="playlist-tags" placeholder="Select Playlists" multiple>
  245. {% for pl in user_owned_playlists %}
  246. {% if pl.playlist_id != playlist.playlist_id %}
  247. <option value="{{ pl.playlist_id }}" class="text-dark">{{ pl.name }}</option>
  248. {% endif %}
  249. {% endfor %}
  250. </select>
  251. </div>
  252. </div>
  253. <div class="d-flex justify-content-start mt-2">
  254. <!--
  255. <div class="btn-group">
  256. <a href="{% url 'all_playlists' 'all' %}" target="_blank" class="btn btn-sm btn-success" id="select-all-btn">Search for Playlists <i class="fas fa-external-link-alt" aria-hidden="true"></i></a>
  257. </div>
  258. -->
  259. {% if playlist.is_user_owned %}
  260. <div class="btn-group me-2">
  261. <button type="button" class="btn btn-info" id="select-all-btn">Move!</button>
  262. </div>
  263. {% endif %}
  264. <div class="btn-group">
  265. <button type="button" class="btn btn-info" id="select-all-btn">Copy!</button>
  266. </div>
  267. </div>
  268. </div>
  269. </div>
  270. </div>
  271. <div id="row4" style="background-color: #0f5132">
  272. <div class="collapse border-danger" id="deleteItemsCollapse">
  273. <div class="card card-body bg-dark text-white-50">
  274. <div id="delete-videos-confirm-box">
  275. <h5>Are you sure you want to delete these 40 items from your YouTube playlist? This cannot be undone.</h5>
  276. </div>
  277. <div class="d-flex justify-content-start">
  278. <div class="btn-group ms-2">
  279. <button hx-post="{% url 'delete_videos' playlist.playlist_id 'confirmed' %}" hx-include="[id='video-checkboxes']" type="button" class="btn btn-danger" id="select-all-btn">Yes!</button>
  280. </div>
  281. <div class="btn-group ms-2">
  282. <button type="button" class="btn btn-secondary" id="select-all-btn">Nvm</button>
  283. </div>
  284. <div class="btn-group ms-2">
  285. <button hx-post="{% url 'delete_videos' playlist.playlist_id 'confirm' %}" hx-include="[id='video-checkboxes']" hx-target="#delete-videos-confirm-box" type="button" class="btn btn-primary">
  286. <i class="fas fa-sync"></i>
  287. </button>
  288. </div>
  289. </div>
  290. </div>
  291. </div>
  292. </div>
  293. <div class="table-responsive" id="videos-div">
  294. <br>
  295. {% if videos %}
  296. <div class="list-group" id="video-checkboxes">
  297. {% for video in videos|slice:"0:50" %}
  298. <li {% if forloop.last and videos.count > 50 %}hx-get="{% url 'load_more_videos' playlist.playlist_id order_by|default:"all" page|default:"1" %}"
  299. hx-trigger="revealed"
  300. hx-swap="afterend" hx-indicator="#load-more-videos-spinner" {% endif %} class="list-group-item d-flex justify-content-between align-items-center bg-transparent" style="background-color: #40B3A2">
  301. {% if video.is_unavailable_on_yt and not video.was_deleted_on_yt %}
  302. <div class="d-flex justify-content-between align-items-center">
  303. <div>
  304. <input class="video-checkboxes" style="display: none" type="checkbox" value="{{ video.playlist_item_id }}" name="video-id">
  305. </div>
  306. <div class="ms-4" style="max-width: 115px; max-height: 100px;">
  307. <img src="https://i.ytimg.com/vi/9219YrnwDXE/maxresdefault.jpg" class="img-fluid" alt="">
  308. </div>
  309. <div class="ms-4">
  310. <a class="link-dark" href="https://www.youtube.com/watch?v={{ video.video_id }}&list={{ video.playlist.playlist_id }}" target="_blank">
  311. {{ video.video_position }}. {{ video.name }}
  312. </a>
  313. <br><br>
  314. </div>
  315. </div>
  316. {% else %}
  317. <div class="d-flex justify-content-between align-items-center" >
  318. <div>
  319. <input class="video-checkboxes" style="display: none" type="checkbox" value="{{ video.playlist_item_id }}" name="video-id">
  320. </div>
  321. <div class="ms-4" style="max-width: 115px; max-height: 100px;">
  322. <img src="{% if video.thumbnail_url %}{{ video.thumbnail_url }}{% else %}https://i.ytimg.com/vi/9219YrnwDXE/maxresdefault.jpg{% endif %}" class="img-fluid" alt="">
  323. </div>
  324. <div class="ms-4">
  325. {% if video.is_unavailable_on_yt and video.was_deleted_on_yt %}
  326. {{ video.video_position }}.
  327. <a class="link-dark" href="https://www.youtube.com/watch?v={{ video.video_id }}&list={{ video.playlist.playlist_id }}" target="_blank">
  328. {{ video.name|truncatewords:"16" }}
  329. </a>
  330. <br>
  331. <span class="badge bg-dark">VIDEO UNAVAILABLE</span>
  332. {% if video.video_details_modified %}<span class="badge bg-danger">WENT PRIVATE/DELETED {{ video.updated_at|naturaltime|upper }}</span>{% endif %}
  333. <br><br>
  334. {% else %}
  335. {{ video.video_position }}.
  336. <a class="link-dark" href="https://www.youtube.com/watch?v={{ video.video_id }}&list={{ video.playlist.playlist_id }}" target="_blank">
  337. {{ video.name|truncatewords:"16" }}
  338. </a> by {{ video.channel_name }} <br>
  339. <span class="badge bg-secondary">{{ video.duration }}</span>
  340. {% if video.has_cc %}<span class="badge bg-secondary">CC</span>{% endif %}
  341. {% if video.published_at %}<span class="badge bg-secondary">{{ video.published_at }}</span>{% endif %}
  342. {% if video.view_count %}<span class="badge bg-info">{{ video.view_count|intword|intcomma }} views</span>{% endif %}
  343. {% if video.is_duplicate %}<span class="badge bg-primary">duplicate</span>{% endif %}
  344. {% if video.video_details_modified %}<span class="badge bg-danger">{% if video.was_deleted_on_yt %}WENT PRIVATE/DELETED{% else %}ADDED{% endif %} {{ video.created_at|naturaltime|upper }}</span>{% endif %}<br>
  345. <br>
  346. {% endif %}
  347. </div>
  348. </div>
  349. <div class="ms-5">
  350. {% if video.is_unavailable_on_yt and video.was_deleted_on_yt %}
  351. <button class="btn btn-sm btn-warning mb-1" type="button" data-bs-toggle="offcanvas" data-bs-target="#offcanvasForVideoNotes" aria-controls="offcanvasBottom" hx-get="{% url 'video_notes' playlist.playlist_id video.video_id %}" hx-trigger="click" hx-target="#video-notes">Notes</button>
  352. <button class="btn btn-sm btn-dark mb-1" type="button" hx-get="{% url 'mark_video_favorite' playlist.playlist_id video.video_id %}" hx-target="#video-{{ forloop.counter }}-fav">
  353. <div id="video-{{ forloop.counter }}-fav">
  354. {% if video.is_favorite %}
  355. <i class="fas fa-heart"></i>
  356. {% else %}
  357. <i class="far fa-heart"></i>
  358. {% endif %}
  359. </div>
  360. </button>
  361. {% else %}
  362. <a class="btn btn-sm btn-info mb-1" type="button" href="https://www.youtube.com/watch?v={{ video.video_id }}" class="btn btn-info me-1" target="_blank"><i class="fas fa-external-link-alt" aria-hidden="true"></i></a>
  363. <input class="form-control me-1 visually-hidden" id="video-{{ video.video_id }}" value="https://www.youtube.com/watch?v={{ video.video_id }}">
  364. <button class="copy-btn btn btn-sm btn-success mb-1" data-clipboard-target="#video-{{ video.video_id }}">
  365. <i class="far fa-copy" aria-hidden="true"></i>
  366. </button>
  367. <button class="btn btn-sm btn-primary mb-1" type="button" data-bs-toggle="offcanvas" data-bs-target="#offcanvasWithBackdrop" aria-controls="offcanvasBottom" hx-get="{% url 'video_details' playlist.playlist_id video.video_id %}" hx-trigger="click" hx-target="#video-details"><i class="fas fa-info"></i></button>
  368. <button class="btn btn-sm btn-warning mb-1" type="button" data-bs-toggle="offcanvas" data-bs-target="#offcanvasForVideoNotes" aria-controls="offcanvasBottom" hx-get="{% url 'video_notes' playlist.playlist_id video.video_id %}" hx-trigger="click" hx-target="#video-notes">Notes</button>
  369. <button class="btn btn-sm btn-dark mb-1" type="button" hx-get="{% url 'mark_video_favorite' playlist.playlist_id video.video_id %}" hx-target="#video-{{ forloop.counter }}-fav">
  370. <div id="video-{{ forloop.counter }}-fav">
  371. {% if video.is_favorite %}
  372. <i class="fas fa-heart" style="color: #fafa06"></i>
  373. {% else %}
  374. <i class="far fa-heart"></i>
  375. {% endif %}
  376. </div>
  377. </button>
  378. {% if playlist.marked_as == "watching" %}
  379. <button class="btn btn-sm btn-light mb-1" type="button" hx-get="{% url 'mark_video_watched' playlist.playlist_id video.video_id %}" hx-target="#video-{{ forloop.counter }}-watched">
  380. <div id="video-{{ forloop.counter }}-watched">
  381. {% if video.is_marked_as_watched %}
  382. <i class="fas fa-check-circle"></i>
  383. {% else %}
  384. <i class="far fa-check-circle"></i>
  385. {% endif %}
  386. </div>
  387. </button>
  388. {% endif %}
  389. {% endif %}
  390. </div>
  391. {% endif %}
  392. </li>
  393. {% endfor %}
  394. </div>
  395. {% else %}
  396. <div class="card bg-dark text-white mb-3">
  397. <div class="card-body">
  398. <div class="d-flex justify-content-center align-content-center">
  399. Playlist is empty ;-;
  400. </div>
  401. <div class="d-flex justify-content-center align-content-center">
  402. Consider moving/copying videos from other playlists into this playlist by copying and using this playlist's ID.
  403. </div>
  404. </div>
  405. </div>
  406. {% endif %}
  407. </div>
  408. {% endif %}
  409. <div class="d-flex justify-content-center">
  410. <img id="load-more-videos-spinner" class="htmx-indicator mt-4" src="{% static 'svg-loaders/spinning-circles.svg' %}" width="40" height="40">
  411. </div>
  412. </div>
  413. <!--
  414. <script src="{% static 'youtube-audio-player/iframe-api.js' %}"></script>
  415. <script src="{% static 'youtube-audio-player/yt.min.js' %}"></script>
  416. -->
  417. {% endblock %}