2021-09-05 17:10:14 +00:00
|
|
|
{% extends "home/base.html" %}
|
|
|
|
{% load static %}
|
|
|
|
{% block content %}
|
|
|
|
<div class="title-bar">
|
|
|
|
<h1>Downloads</h1>
|
|
|
|
</div>
|
2021-12-05 09:42:33 +00:00
|
|
|
<div id="notifications" data="download"></div>
|
2021-09-24 11:03:22 +00:00
|
|
|
<div id="downloadControl"></div>
|
2021-10-03 11:54:04 +00:00
|
|
|
<div class="info-box info-box-3">
|
2021-09-05 17:10:14 +00:00
|
|
|
<div class="icon-text">
|
|
|
|
<img id="rescan-icon" onclick="rescanPending()" src="{% static 'img/icon-rescan.svg' %}" alt="rescan-icon">
|
|
|
|
<p>Rescan subscriptions</p>
|
|
|
|
</div>
|
|
|
|
<div class="icon-text">
|
|
|
|
<img id="download-icon" onclick="dlPending()" src="{% static 'img/icon-download.svg' %}" alt="download-icon">
|
2021-10-03 05:25:56 +00:00
|
|
|
<p>Start download</p>
|
2021-09-05 17:10:14 +00:00
|
|
|
</div>
|
|
|
|
<div class="icon-text">
|
|
|
|
<img id="add-icon" onclick="showForm()" src="{% static 'img/icon-add.svg' %}" alt="add-icon">
|
|
|
|
<p>Add to download queue</p>
|
|
|
|
<div class="show-form">
|
|
|
|
<form id='hidden-form' action="/downloads/" method="post">
|
|
|
|
{% csrf_token %}
|
2021-10-30 07:14:16 +00:00
|
|
|
{{ add_form }}
|
2021-09-05 17:10:14 +00:00
|
|
|
<button type="submit">Add to download queue</button>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2021-10-03 11:17:07 +00:00
|
|
|
<div class="view-controls">
|
|
|
|
<div class="toggle">
|
|
|
|
<span>Show only ignored videos:</span>
|
|
|
|
<div class="toggleBox">
|
|
|
|
<input
|
|
|
|
id="show_ignored_only" onclick="toggleCheckbox(this)" type="checkbox"
|
|
|
|
{% if show_ignored_only %}
|
|
|
|
checked
|
|
|
|
{% endif %}
|
|
|
|
>
|
|
|
|
<label for="" class="onbtn">On</label>
|
|
|
|
<label for="" class="ofbtn">Off</label>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="view-icons">
|
|
|
|
<img src="{% static 'img/icon-gridview.svg' %}" onclick="changeView(this)" data-origin="downloads" data-value="grid" alt="grid view">
|
|
|
|
<img src="{% static 'img/icon-listview.svg' %}" onclick="changeView(this)" data-origin="downloads" data-value="list" alt="list view">
|
|
|
|
</div>
|
2021-10-02 11:37:22 +00:00
|
|
|
</div>
|
2021-11-25 13:02:25 +00:00
|
|
|
<div class="title-split">
|
|
|
|
{% if show_ignored_only %}
|
|
|
|
<h2>Ignored from download</h2>
|
|
|
|
<button onclick="deleteQueue(this)" data-id="ignore" title="Delete all previously ignored videos from the queue">Delete all ignored</button>
|
|
|
|
{% else %}
|
|
|
|
<h2>Download queue</h2>
|
|
|
|
<button onclick="deleteQueue(this)" data-id="pending" title="Delete all pending videos from the queue">Delete all queued</button>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
2021-10-02 11:37:22 +00:00
|
|
|
<h3>Total videos: {{ max_hits }}</h3>
|
|
|
|
<div class="dl-list {{ view_style }}">
|
2021-09-28 09:53:45 +00:00
|
|
|
{% if all_video_hits %}
|
|
|
|
{% for video in all_video_hits %}
|
2021-10-02 11:37:22 +00:00
|
|
|
<div class="dl-item {{ view_style }}" id="dl-{{ video.youtube_id }}">
|
|
|
|
<div class="dl-thumb {{ view_style }}">
|
2021-10-11 06:33:28 +00:00
|
|
|
<img src="/cache/{{ video.vid_thumb_url }}" alt="video_thumb">
|
2021-10-03 11:17:07 +00:00
|
|
|
{% if show_ignored_only %}
|
2021-10-22 11:24:18 +00:00
|
|
|
<span>ignored</span>
|
2021-09-28 09:53:45 +00:00
|
|
|
{% else %}
|
2021-10-22 11:24:18 +00:00
|
|
|
<span>queued</span>
|
2021-09-28 09:53:45 +00:00
|
|
|
{% endif %}
|
2021-10-22 11:24:18 +00:00
|
|
|
</div>
|
|
|
|
<div class="dl-desc {{ view_style }}">
|
|
|
|
<h3>{{ video.title }}</h3>
|
2021-09-05 17:10:14 +00:00
|
|
|
{% if video.channel_indexed %}
|
|
|
|
<a href="{% url 'channel_id' video.channel_id %}">{{ video.channel_name }}</a>
|
|
|
|
{% else %}
|
|
|
|
<span>{{ video.channel_name }}</span>
|
|
|
|
{% endif %}
|
|
|
|
<p>Published: {{ video.published }} | Duration: {{ video.duration }} | {{ video.youtube_id }}</p>
|
2021-10-03 11:17:07 +00:00
|
|
|
{% if show_ignored_only %}
|
2021-09-28 09:53:45 +00:00
|
|
|
<button data-id="{{ video.youtube_id }}" onclick="forgetIgnore(this)">Forget</button>
|
|
|
|
<button data-id="{{ video.youtube_id }}" onclick="addSingle(this)">Add to queue</button>
|
|
|
|
{% else %}
|
|
|
|
<button data-id="{{ video.youtube_id }}" onclick="toIgnore(this)">Ignore</button>
|
|
|
|
<button id="{{ video.youtube_id }}" data-id="{{ video.youtube_id }}" onclick="downloadNow(this)">Download now</button>
|
|
|
|
{% endif %}
|
2021-09-05 17:10:14 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
|
|
|
<script type="text/javascript" src="{% static 'progress.js' %}"></script>
|
|
|
|
{% endblock content %}
|