mediasort/templates/index.html

119 lines
4.2 KiB
HTML
Raw Normal View History

2019-08-17 10:25:11 -07:00
{% extends "page.html" %}
2019-08-19 09:32:32 -07:00
2019-08-17 12:50:46 -07:00
{% block toolbar %}
2019-08-19 09:32:32 -07:00
<a class="nav-item is-active" href="/home">Home</a>
<a class="nav-item" href="/home">Refresh</a>
{% if inflight %}<span class="nav-item">Scanning in progress...</span>
{% else %}<a class="nav-item" href="/home?action=update">Rescan</a>{% endif %}
<a class="nav-item" href="/home">Blah</a>
<hr />
<a class="nav-item" href="/home">Blah</a>
<a class="nav-item" href="/home">Blah</a>
2019-08-17 12:50:46 -07:00
{% endblock %}
2019-08-17 10:25:11 -07:00
2019-08-19 09:32:32 -07:00
{% block main %}
<form action="/autosort" method="post">
<header class="flex items-center py1 border-bottom">
<h1 class="m0">Completed</h1>
{% if inflight %}<a class="btn ml-auto btn-primary rounded-left">Scanning...</a>
{% else %}<a href="/home?action=update" class="btn ml-auto btn-primary rounded-left">Rescan</a>{% endif %}
<input type="submit" value="Autosort selected" class="btn btn-danger rounded-right">
</header>
<section class="flex py2">
2019-08-17 14:28:25 -07:00
<table>
<tr>
<th></th>
<th>hash</th>
<th>name</th>
<th>show</th>
<th>season</th>
<th>actions</th>
</tr>
2019-08-17 15:09:32 -07:00
{% for torid, tor in torrents.items()|tsortbyname %}{% if tor.is_finished %}
2019-08-17 14:28:25 -07:00
<tr>
2019-08-17 23:34:26 -07:00
<td><input type="checkbox" name="tkeys" value="{{ torid }}"{% if torid in moves %} checked="checked"{% else %} disabled="disabled"{% endif %}/></td>
2019-08-17 18:30:30 -07:00
<td>{{ torid[0:8] }}</td>
2019-08-17 15:09:32 -07:00
<td>
2019-08-19 09:32:32 -07:00
<span class="h3">{{ tor.name }}</span><br />
<span class="h6">{{ tor.save_path }}</span>
2019-08-17 15:09:32 -07:00
</td>
2019-08-17 14:28:25 -07:00
{% if torid in moves %}
<td>{{ moves[torid].dest.dir }}</td>
<td>{{moves[torid].subdest}}</td>
{% else %}
<td>?</td>
<td>?</td>
{% endif %}
<td>
2019-08-17 17:57:02 -07:00
<a href="/move?tkey={{ torid }}"><button type="button">Move</button></a>
<a href="/sort?tkey={{ torid }}"><button type="button">Sort</button></a>
2019-08-17 14:28:25 -07:00
</td>
</tr>
{% endif %}{% endfor %}
</table>
2019-08-19 09:32:32 -07:00
</section>
</form>
<header class="flex items-center py1 border-bottom">
<h1 class="m0">Downloading</h1>
</header>
<section class="flex mb3">
2019-08-17 10:25:11 -07:00
<table>
<tr>
<th>hash</th>
<th>name</th>
<th>path</th>
<th>status</th>
2019-08-17 10:50:31 -07:00
<th>progress</th>
2019-08-17 10:25:11 -07:00
<th>actions</th>
</tr>
{% for tkey, tor in torrents.items()|tsortbyname %}{% if not tor.is_finished %}
2019-08-17 10:25:11 -07:00
<tr>
<td>{{ tkey[0:8] }}</td>
2019-08-17 10:25:11 -07:00
<td>{{ tor.name }}</td>
<td>{{ tor.save_path }}</td>
<td>{% if tor.paused %}paused
{% else %}downloading @ {{ tor.peers | sum(attribute='down_speed') }} B/s ({{ tor.eta or "?" }}s)
{% endif %}</td>
<td>{{ tor.progress|round(2) }}%</td>
2019-08-17 10:25:11 -07:00
<td>
<form action="/modify" method="post">
<input type="hidden" name="tkey" value="{{ tkey }}" />
{% if tor.paused %}
<input name="action" type="submit" name="action" value="Resume" />
{% else %}
<input name="action" type="submit" name="action" value="Pause" />
{% endif %}
2019-09-29 13:27:38 -07:00
{% if tor.progress == 0 %}
<input name="action" type="submit" name="action" value="Delete" />
{% endif %}
</form>
2019-08-17 10:25:11 -07:00
</td>
</tr>
{% endif %}{% endfor %}
</table>
2019-08-19 09:32:32 -07:00
</section>
<header class="flex items-center py1 border-bottom">
<h1 class="m0">Library</h1>
</header>
<section class="flex mb3">
<details>
<summary>Library information</summary>
<h2>Shows ({{ shows|len }})</h2>
<table>
<tr>
<th>name</th>
<th>path</th>
<th>sorting</th>
</tr>
{% for show in shows %}
<tr>
<td>{{ show.name }}</td>
<td>{{ show.dir }}</td>
<td>{{ show.mode }}</td>
</tr>
{% endfor %}
</table>
</details>
</section>
{% endblock %}