user_playlist_updates.html 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. {% load static %}
  2. {% if playlists or deleted_playlist_names %}
  3. <div id="user-pl-updates">
  4. <div class="alert alert-success alert-dismissible fade show" role="alert">
  5. <h4 class="alert-heading">Updates</h4>
  6. <p>
  7. {% if playlists %}
  8. The following new playlists were detected on your YouTube channel and are not on UnTube:
  9. <ul>
  10. {% for playlist in playlists %}
  11. <li>
  12. <a href="https://www.youtube.com/playlist?list={{ playlist.playlist_id }}" class="text-decoration-none" target="_blank">
  13. {{ playlist.name }}
  14. </a>
  15. {% if playlist.video_count == 1 %}
  16. ({{ playlist.video_count }} video)
  17. {% else %}
  18. ({{ playlist.video_count }} videos)
  19. {% endif %}
  20. </li>
  21. {% endfor %}
  22. </ul>
  23. {% endif %}
  24. {% if deleted_playlist_names %}
  25. The following playlists were deleted on YouTube (and have also been removed from UnTube):
  26. <ul>
  27. {% for playlist in deleted_playlist_names %}
  28. <li>
  29. {{ playlist }}
  30. </li>
  31. {% endfor %}
  32. </ul>
  33. {% endif %}
  34. <button class="btn btn-success" hx-get="{% url 'user_playlists_updates' 'init-update' %}" hx-trigger="click" hx-target="#user-pl-updates">Import</button>
  35. </p>
  36. <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
  37. </div>
  38. </div>
  39. {% endif %}