mediasort/templates/index.html

85 lines
2.5 KiB
HTML

{% extends "page.html" %}
{% block toolbar %}
<form action="/" method="post">
<input name="action" type="submit" value="refresh">
<input name="action" type="submit" value="update">
</form>
{% endblock %}
{% block body %}
<div class="torrents">
<h2>Completed</h2>
<form action="/autosort" method="post">
<table>
<tr>
<th></th>
<th>hash</th>
<th>name</th>
<th>show</th>
<th>season</th>
<th>actions</th>
</tr>
{% for torid, tor in torrents.items()|tsortbyname %}{% if tor.is_finished %}
<tr>
<td><input type="checkbox" name="torrents" value="{{ torid }}"{% if torid in moves %} checked="checked"{% endif %}></td>
<td>{{ torid[0:6] }}</td>
<td>
{{ tor.name }}<br />
<span class="small">{{ tor.save_path }}</span>
</td>
{% if torid in moves %}
<td>{{ moves[torid].dest.dir }}</td>
<td>{{moves[torid].subdest}}</td>
{% else %}
<td>?</td>
<td>?</td>
{% endif %}
<td>
<a href="/move?thash={{ torid }}"><button type="button">Move</button></a>
<a href="/sort?thash={{ torid }}"><button type="button">Sort</button></a>
</td>
</tr>
{% endif %}{% endfor %}
</table>
<br/>
<input type="submit" value="Autosort selected">
</form>
<h2>Downloading</h2>
<table>
<tr>
<th>hash</th>
<th>name</th>
<th>path</th>
<th>progress</th>
<th>actions</th>
</tr>
{% for torid, tor in torrents.items()|tsortbyname %}{% if not tor.is_finished %}
<tr>
<td>{{ torid[0:6] }}</td>
<td>{{ tor.name }}</td>
<td>{{ tor.save_path }}</td>
<td>{{ tor.progress }}%</td>
<td>
<a href="/foo"><button type="button">Resume</button></a>
</td>
</tr>
{% endif %}{% endfor %}
</table>
<h2>Shows</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>
</div>
{% endblock %}