{{define "body" -}}
<pre>[v]: show video
[+]: increase priority
[-]: decrease priority
[s]: stop preloading
Quota: {{.QuotaCur}} / {{.QuotaMax}} GiB
</pre>
<table>
  <tr class="listitem">
    <td class="listpath up"><a href="/">/</a></td>
    <td class="listoptions">[dir]</td>
  </tr>
{{range $s := .Paths.Files -}}
  <tr class="listitem">
    <td class="listpath"><a href="{{$s.URI}}">{{$s.Name}}</a></td>
    <td class="listoptions">
      {{if ge $s.Status 0}}<span>{{$s.Status}}%</span>{{end}}
{{if $s.Running -}}
      <span class="status-green">[running]</span>
{{else -}}
{{if ge $s.Errc 10 -}}
      <span class="status-red">[error]</span>
{{else -}}
      <span class="status-yellow">[queued]</span>
{{end -}}
{{end -}}
      <span>{{$s.Size}}</span>
      <span>{{$s.Prio}}</span><a href="{{$s.URI}}?o=v">[v]</a><a href="{{$s.Name}}?o=s&r=preloads">[s]</a><a href="{{$s.Name}}?o=i&r=preloads">[+]</a><a href="{{$s.Name}}?o=d&r=preloads">[-]</a>
    </td>
  </tr>
  <tr class="spacer"><td colspan="2">
{{if ge $s.Status 0 -}}
    <div class="spacer {{if le $s.Status 35}}red{{else if le $s.Status 65}}yellow{{else}}green{{end}}" style="width: {{$s.Status}}%;"></div>
{{end -}}
  </td></tr>
{{end -}}
</table>
{{end -}}
