show some counts in ui
This commit is contained in:
parent
c067278f03
commit
508448229b
|
@ -202,7 +202,7 @@ class MediaWeb(object):
|
||||||
pmap = client.pathmap
|
pmap = client.pathmap
|
||||||
fname = get_fname(torrent)
|
fname = get_fname(torrent)
|
||||||
|
|
||||||
in_library_path = os.path.join(match.dest.dir, match.subdest, fname) # path relative from the library's root
|
in_library_path = os.path.join(match.dest.dir, match.subdest, fname) # path relative from the library's root
|
||||||
client_full_path = os.path.join(torrent["save_path"], fname) # absolute storage path in deluge
|
client_full_path = os.path.join(torrent["save_path"], fname) # absolute storage path in deluge
|
||||||
|
|
||||||
assert client_full_path[0:len(pmap[0])] == pmap[0] # sanity check: deluge's path must starts with our pathmap
|
assert client_full_path[0:len(pmap[0])] == pmap[0] # sanity check: deluge's path must starts with our pathmap
|
||||||
|
@ -234,7 +234,7 @@ class MediaWeb(object):
|
||||||
torrent = client.rpc.core.get_torrent_status(thash, []) # TODO reduce to needed fields
|
torrent = client.rpc.core.get_torrent_status(thash, []) # TODO reduce to needed fields
|
||||||
self.execute_move(tkey, torrent, self.cache.moves[tkey])
|
self.execute_move(tkey, torrent, self.cache.moves[tkey])
|
||||||
|
|
||||||
self.rpc.refresh()
|
self.cache.refresh()
|
||||||
# TODO summary display of results
|
# TODO summary display of results
|
||||||
|
|
||||||
return f"autosorted: {repr(tkeys)}"
|
return f"autosorted: {repr(tkeys)}"
|
||||||
|
@ -314,7 +314,8 @@ def main():
|
||||||
tpl_dir = os.path.join(APPROOT, "templates")
|
tpl_dir = os.path.join(APPROOT, "templates")
|
||||||
tpl = Environment(loader=FileSystemLoader(tpl_dir),
|
tpl = Environment(loader=FileSystemLoader(tpl_dir),
|
||||||
autoescape=select_autoescape(['html', 'xml']))
|
autoescape=select_autoescape(['html', 'xml']))
|
||||||
tpl.filters.update(tsortbyname=tsortbyname)
|
tpl.filters.update(tsortbyname=tsortbyname,
|
||||||
|
len=len, )
|
||||||
|
|
||||||
def validate_password(realm, user, passw):
|
def validate_password(realm, user, passw):
|
||||||
return user == passw # lol
|
return user == passw # lol
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
</tr>
|
</tr>
|
||||||
{% for torid, tor in torrents.items()|tsortbyname %}{% if tor.is_finished %}
|
{% for torid, tor in torrents.items()|tsortbyname %}{% if tor.is_finished %}
|
||||||
<tr>
|
<tr>
|
||||||
<td><input type="checkbox" name="torrents" value="{{ torid }}"{% if torid in moves %} checked="checked"{% endif %}></td>
|
<td><input type="checkbox" name="tkeys" value="{{ torid }}"{% if torid in moves %} checked="checked"{% else %} disabled="disabled"{% endif %}/></td>
|
||||||
<td>{{ torid[0:8] }}</td>
|
<td>{{ torid[0:8] }}</td>
|
||||||
<td>
|
<td>
|
||||||
{{ tor.name }}<br />
|
{{ tor.name }}<br />
|
||||||
|
@ -79,6 +79,7 @@
|
||||||
<div class="libraryinfo">
|
<div class="libraryinfo">
|
||||||
<details>
|
<details>
|
||||||
<summary>Library information</summary>
|
<summary>Library information</summary>
|
||||||
|
<h2>Shows ({{ shows|len }})</h2>
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<th>name</th>
|
<th>name</th>
|
||||||
|
|
|
@ -45,7 +45,10 @@
|
||||||
</table>
|
</table>
|
||||||
<br />
|
<br />
|
||||||
<input type="submit" value="Sort">
|
<input type="submit" value="Sort">
|
||||||
{% if score > 0 %}<a href="/sort?tkey={{ tkey }}&score={{ score // 2 }}#bottom" class="right">show more (S={{ score }}%)</a>{% endif %}
|
<div class="right">
|
||||||
|
{% if score > 0 %}<a href="/sort?tkey={{ tkey }}&score={{ score // 2 }}#bottom">show more (S={{ score }}%)</a>{% endif %}
|
||||||
|
{{ matches|len }}
|
||||||
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue