2021-09-05 17:10:14 +00:00
{% extends "home/base.html" %}
{% block content %}
{% load static %}
2022-05-28 06:57:29 +00:00
< div class = "boxed-content {% if view_style == " grid " % } boxed- { { grid_items } } { % endif % } " >
2022-03-07 13:26:37 +00:00
{% if continue_vids %}
< div class = "title-bar" >
< h1 > Continue Watching< / h1 >
< / div >
2022-05-28 06:57:29 +00:00
< div class = "video-list {{ view_style }} {% if view_style == " grid " % } grid- { { grid_items } } { % endif % } " >
2022-03-07 13:26:37 +00:00
{% for video in continue_vids %}
< div class = "video-item {{ view_style }}" >
2022-03-12 10:29:34 +00:00
< a href = "#player" data-id = "{{ video.source.youtube_id }}" onclick = "createPlayer(this)" >
2022-03-07 13:26:37 +00:00
< div class = "video-thumb-wrap {{ view_style }}" >
< div class = "video-thumb" >
2022-03-12 10:29:34 +00:00
< img src = "/cache/{{ video.source.vid_thumb_url }}" alt = "video-thumb" >
{% if video.source.player.progress %}
< div class = "video-progress-bar" id = "progress-{{ video.source.youtube_id }}" style = "width: {{video.source.player.progress}}%;" > < / div >
2022-03-07 13:26:37 +00:00
{% else %}
2022-03-12 10:29:34 +00:00
< div class = "video-progress-bar" id = "progress-{{ video.source.youtube_id }}" style = "width: 0%;" > < / div >
2022-03-07 13:26:37 +00:00
{% endif %}
< / div >
< div class = "video-play" >
< img src = "{% static 'img/icon-play.svg' %}" alt = "play-icon" >
< / div >
< / div >
< / a >
< div class = "video-desc {{ view_style }}" >
2022-03-12 10:29:34 +00:00
< div class = "video-desc-player" id = "video-info-{{ video.source.youtube_id }}" >
{% if video.source.player.watched %}
< img src = "{% static 'img/icon-seen.svg' %}" alt = "seen-icon" data-id = "{{ video.source.youtube_id }}" data-status = "watched" onclick = "updateVideoWatchStatus(this)" class = "watch-button" title = "Mark as unwatched" >
2022-03-07 13:26:37 +00:00
{% else %}
2022-03-12 10:29:34 +00:00
< img src = "{% static 'img/icon-unseen.svg' %}" alt = "unseen-icon" data-id = "{{ video.source.youtube_id }}" data-status = "unwatched" onclick = "updateVideoWatchStatus(this)" class = "watch-button" title = "Mark as watched" >
2022-03-07 13:26:37 +00:00
{% endif %}
2022-03-12 10:29:34 +00:00
< span > {{ video.source.published }} | {{ video.source.player.duration_str }}< / span >
2022-03-07 13:26:37 +00:00
< / div >
< div >
2022-03-12 10:29:34 +00:00
< a href = "{% url 'channel_id' video.source.channel.channel_id %}" > < h3 > {{ video.source.channel.channel_name }}< / h3 > < / a >
< a class = "video-more" href = "{% url 'video' video.source.youtube_id %}" > < h2 > {{ video.source.title }}< / h2 > < / a >
2022-03-07 13:26:37 +00:00
< / div >
< / div >
< / div >
{% endfor %}
< / div >
{% endif %}
2021-12-06 11:05:25 +00:00
< div class = "title-bar" >
< h1 > Recent Videos< / h1 >
2021-09-05 17:10:14 +00:00
< / div >
2021-12-06 11:05:25 +00:00
< div class = "view-controls" >
< div class = "toggle" >
2022-01-01 11:13:12 +00:00
< span > Hide watched:< / span >
2021-12-06 11:05:25 +00:00
< div class = "toggleBox" >
2021-12-18 11:22:57 +00:00
< input id = "hide_watched" onclick = "toggleCheckbox(this)" type = "checkbox" { % if hide_watched % } checked { % endif % } >
2022-01-15 07:18:23 +00:00
{% if not hide_watched %}
2021-12-18 11:22:57 +00:00
< label for = "" class = "ofbtn" > Off< / label >
{% else %}
< label for = "" class = "onbtn" > On< / label >
{% endif %}
2021-12-06 11:05:25 +00:00
< / div >
< / div >
2022-01-02 09:25:05 +00:00
< div class = "sort" >
< div id = "hidden-form" >
< span > Sort by:< / span >
< select name = "sort" id = "sort" onchange = "sortChange(this.value)" >
< option value = "published" { % if sort_by = = " published " % } selected { % endif % } > date published< / option >
< option value = "downloaded" { % if sort_by = = " downloaded " % } selected { % endif % } > date downloaded< / option >
< option value = "views" { % if sort_by = = " views " % } selected { % endif % } > views< / option >
< option value = "likes" { % if sort_by = = " likes " % } selected { % endif % } > likes< / option >
< / select >
< select name = "sord-order" id = "sort-order" onchange = "sortChange(this.value)" >
< option value = "asc" { % if sort_order = = " asc " % } selected { % endif % } > asc< / option >
< option value = "desc" { % if sort_order = = " desc " % } selected { % endif % } > desc< / option >
< / select >
2022-01-01 11:13:12 +00:00
< / div >
2022-01-02 09:25:05 +00:00
< / div >
< div class = "view-icons" >
< img src = "{% static 'img/icon-sort.svg' %}" alt = "sort-icon" onclick = "showForm()" id = "animate-icon" >
2022-05-28 06:57:29 +00:00
{% if view_style == "grid" %}
2022-05-28 14:41:17 +00:00
< div class = "grid-count" >
< span > {{ grid_items }}< / span >
< img src = "{% static 'img/icon-add.svg' %}" onclick = "changeGridItems(this)" data-value = "{{ grid_items|add:" 1 " } } " alt = "grid plus row" >
< img src = "{% static 'img/icon-substract.svg' %}" onclick = "changeGridItems(this)" data-value = "{{ grid_items|add:" -1 " } } " alt = "grid minus row" >
< / div >
2022-05-28 06:57:29 +00:00
{% endif %}
2021-12-06 11:05:25 +00:00
< img src = "{% static 'img/icon-gridview.svg' %}" onclick = "changeView(this)" data-origin = "home" data-value = "grid" alt = "grid view" >
< img src = "{% static 'img/icon-listview.svg' %}" onclick = "changeView(this)" data-origin = "home" data-value = "list" alt = "list view" >
< / div >
2021-10-03 11:52:29 +00:00
< / div >
2021-12-06 15:14:42 +00:00
< / div >
< div id = "player" class = "player-wrapper" > < / div >
2022-05-28 06:57:29 +00:00
< div class = "boxed-content {% if view_style == " grid " % } boxed- { { grid_items } } { % endif % } " >
< div class = "video-list {{ view_style }} {% if view_style == " grid " % } grid- { { grid_items } } { % endif % } " >
2021-12-27 05:01:49 +00:00
{% if results %}
{% for video in results %}
2021-12-06 11:05:25 +00:00
< div class = "video-item {{ view_style }}" >
2022-02-05 11:26:31 +00:00
< a href = "#player" data-id = "{{ video.source.youtube_id }}" onclick = "createPlayer(this)" >
2021-12-06 11:05:25 +00:00
< div class = "video-thumb-wrap {{ view_style }}" >
< div class = "video-thumb" >
< img src = "/cache/{{ video.source.vid_thumb_url }}" alt = "video-thumb" >
2022-02-24 11:58:26 +00:00
{% if video.source.player.progress %}
2022-03-07 13:58:17 +00:00
< div class = "video-progress-bar" id = "progress-{{ video.source.youtube_id }}" style = "width: {{video.source.player.progress}}%;" > < / div >
2022-02-25 03:39:33 +00:00
{% else %}
2022-03-07 13:58:17 +00:00
< div class = "video-progress-bar" id = "progress-{{ video.source.youtube_id }}" style = "width: 0%;" > < / div >
2022-02-24 11:58:26 +00:00
{% endif %}
2021-12-06 11:05:25 +00:00
< / div >
< div class = "video-play" >
< img src = "{% static 'img/icon-play.svg' %}" alt = "play-icon" >
< / div >
2021-09-05 17:10:14 +00:00
< / div >
2021-12-06 11:05:25 +00:00
< / a >
< div class = "video-desc {{ view_style }}" >
< div class = "video-desc-player" id = "video-info-{{ video.source.youtube_id }}" >
{% if video.source.player.watched %}
2022-03-10 13:20:23 +00:00
< img src = "{% static 'img/icon-seen.svg' %}" alt = "seen-icon" data-id = "{{ video.source.youtube_id }}" data-status = "watched" onclick = "updateVideoWatchStatus(this)" class = "watch-button" title = "Mark as unwatched" >
2021-12-06 11:05:25 +00:00
{% else %}
2022-03-10 13:20:23 +00:00
< img src = "{% static 'img/icon-unseen.svg' %}" alt = "unseen-icon" data-id = "{{ video.source.youtube_id }}" data-status = "unwatched" onclick = "updateVideoWatchStatus(this)" class = "watch-button" title = "Mark as watched" >
2021-12-06 11:05:25 +00:00
{% endif %}
< span > {{ video.source.published }} | {{ video.source.player.duration_str }}< / span >
< / div >
< div >
< a href = "{% url 'channel_id' video.source.channel.channel_id %}" > < h3 > {{ video.source.channel.channel_name }}< / h3 > < / a >
< a class = "video-more" href = "{% url 'video' video.source.youtube_id %}" > < h2 > {{ video.source.title }}< / h2 > < / a >
2021-09-05 17:10:14 +00:00
< / div >
< / div >
< / div >
2021-12-06 11:05:25 +00:00
{% endfor %}
{% else %}
< h2 > No videos found...< / h2 >
2022-02-11 05:52:26 +00:00
< p > If you've already added a channel or playlist, try going to the < a href = "{% url 'downloads' %}" > downloads page< / a > to start the scan and download tasks.< / p >
2021-12-06 11:05:25 +00:00
{% endif %}
< / div >
2021-09-05 17:10:14 +00:00
< / div >
{% endblock content %}