Web app for quickly sorting deluge torrents into a library
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

73 lines
2.0 KiB

  1. {% extends "page.html" %}
  2. {% block toolbar %}
  3. <form action="/" method="post">
  4. <input name="action" type="submit" value="refresh">
  5. <input name="action" type="submit" value="update">
  6. </form>
  7. {% endblock %}
  8. {% block body %}
  9. <div class="torrents">
  10. <h2>Completed</h2>
  11. <table>
  12. <tr>
  13. <th>hash</th>
  14. <th>name</th>
  15. <th>path</th>
  16. <th>dest</th>
  17. <th>status</th>
  18. <th>actions</th>
  19. </tr>
  20. {% for torid, tor in torrents.items() %}{% if tor.is_finished %}
  21. <tr>
  22. <td>{{ torid[0:6] }}</td>
  23. <td>{{ tor.name }}</td>
  24. <td>{{ tor.save_path }}</td>
  25. <td>x</td><!-- TODO pre-computed sort destination for 1 click sorting -->
  26. <td>{{ "complete" if tor.is_finished else "pending" }}</td>
  27. <td>
  28. <a href="/move?thash={{ torid }}"><button>Move</button></a>
  29. <a href="/sort?thash={{ torid }}"><button>Sort</button></a>
  30. </td>
  31. </tr>
  32. {% endif %}{% endfor %}
  33. </table>
  34. <h2>Pending</h2>
  35. <table>
  36. <tr>
  37. <th>hash</th>
  38. <th>name</th>
  39. <th>path</th>
  40. <th>progress</th>
  41. <th>actions</th>
  42. </tr>
  43. {% for torid, tor in torrents.items() %}{% if not tor.is_finished %}
  44. <tr>
  45. <td>{{ torid[0:6] }}</td>
  46. <td>{{ tor.name }}</td>
  47. <td>{{ tor.save_path }}</td>
  48. <td>{{ tor.progress }}%</td>
  49. <td>
  50. <a href="/foo"><button>Resume</button></a>
  51. </td>
  52. </tr>
  53. {% endif %}{% endfor %}
  54. </table>
  55. <h2>Shows</h2>
  56. <table>
  57. <tr>
  58. <th>name</th>
  59. <th>path</th>
  60. <th>sorting</th>
  61. </tr>
  62. {% for show in shows %}
  63. <tr>
  64. <td>{{ show.name }}</td>
  65. <td>{{ show.dir }}</td>
  66. <td>{{ show.mode }}</td>
  67. </tr>
  68. {% endfor %}
  69. </table>
  70. </div>
  71. {% endblock %}