Support uploading multiple files
This commit is contained in:
@ -112,7 +112,7 @@
|
||||
<body>
|
||||
<h1>Simple Downloader</h1>
|
||||
<form action="/upload" method="post" enctype="multipart/form-data">
|
||||
<input type="file" name="file" accept=".drmd">
|
||||
<input type="file" name="files" accept=".drmd" multiple>
|
||||
<input type="submit" value="Upload and Process">
|
||||
</form>
|
||||
<h2>Currently Running Jobs</h2>
|
||||
|
@ -55,22 +55,25 @@
|
||||
<body>
|
||||
<h1>Select Items to Download</h1>
|
||||
<form action="/process" method="post">
|
||||
<input type="hidden" name="filename" value="{{.Filename}}">
|
||||
{{range $season, $items := .Items}}
|
||||
<div class="season">
|
||||
<div class="season-title">
|
||||
<input type="checkbox" class="season-checkbox" id="season-{{$season}}" checked onchange="toggleSeason('{{$season}}')">
|
||||
<label for="season-{{$season}}">{{$season}}</label>
|
||||
</div>
|
||||
{{range $item := $items}}
|
||||
<div class="item">
|
||||
<label>
|
||||
<input type="checkbox" name="items" value="{{$item.Filename}}" checked class="episode-{{$season}}">
|
||||
{{$item.Filename}}
|
||||
</label>
|
||||
<input type="hidden" name="filenames" value="{{.Filenames}}">
|
||||
{{range $filename, $fileItems := .AllItems}}
|
||||
<h2>{{$filename}}</h2>
|
||||
{{range $season, $items := $fileItems}}
|
||||
<div class="season">
|
||||
<div class="season-title">
|
||||
<input type="checkbox" class="season-checkbox" id="season-{{$filename}}-{{$season}}" checked onchange="toggleSeason('{{$filename}}-{{$season}}')">
|
||||
<label for="season-{{$filename}}-{{$season}}">{{$season}}</label>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
{{range $item := $items}}
|
||||
<div class="item">
|
||||
<label>
|
||||
<input type="checkbox" name="items" value="{{$filename}}:{{$item.Filename}}" checked class="episode-{{$filename}}-{{$season}}">
|
||||
{{$item.Filename}}
|
||||
</label>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
<div>
|
||||
<button type="button" onclick="selectAll(true)">Select All</button>
|
||||
|
Reference in New Issue
Block a user