Add download all button and include options to automatically download new episodes

This commit is contained in:
Alex McGrath
2021-02-19 15:44:22 +00:00
committed by Senan Kelly
parent 2a11017d54
commit 10fca91785
8 changed files with 157 additions and 32 deletions

View File

@@ -179,9 +179,22 @@
<table id="podcast-preferences">
{{ range $pref := .Podcasts }}
<tr>
<form id="podcast-{{ $pref.ID }}" action="{{ printf "/admin/delete_podcast_do?id=%d" $pref.ID | path }}" method="post"></form>
<form id="podcast-{{ $pref.ID }}-delete" action="{{ printf "/admin/delete_podcast_do?id=%d" $pref.ID | path }}" method="post"></form>
<form id="podcast-{{ $pref.ID }}-download" action="{{ printf "/admin/download_podcast_do?id=%d" $pref.ID | path }}" method="post"></form>
<form id="podcast-{{ $pref.ID }}-autodl" action="{{ printf "/admin/update_podcast_do?id=%d" $pref.ID | path }}" method="post"></form>
<td>{{ $pref.Title }}</td>
<td><input form="podcast-{{ $pref.ID }}" type="submit" value="delete"></td>
<td><select form="podcast-{{ $pref.ID }}-autodl" name="auto_dl">
{{ if eq $pref.AutoDownload "dl_latest" }}
<option value="dl_latest" selected="selected">download latest</option>
<option value="dl_none">no auto download</option>
{{ else }}
<option value="dl_none" selected="selected" >no auto download</option>
<option value="dl_latest">download latest</option>
{{ end }}
</select></td>
<td><input form="podcast-{{ $pref.ID }}-download" type="submit" value="download all"></td>
<td><input form="podcast-{{ $pref.ID }}-autodl" type="submit" value="save"></td>
<td><input form="podcast-{{ $pref.ID }}-delete" type="submit" value="delete"></td>
</tr>
{{ end }}
<tr>