[WIP] feat: perpping for audio
This commit is contained in:
parent
d79acda770
commit
797d39e847
4
main.go
4
main.go
@ -166,6 +166,10 @@ func main() {
|
||||
w = writeJSONResponse(w, "Provide URL as query")
|
||||
return
|
||||
}
|
||||
toAudio := r.FormValue("toaudio")
|
||||
if toAudio == "on" {
|
||||
log.Println("User requested audio")
|
||||
}
|
||||
|
||||
downloadURL, err := getYoutubeDownloadURL(userURL)
|
||||
if err != nil {
|
||||
|
@ -23,20 +23,28 @@
|
||||
<label data-tooltip="Link can be on any platform!">Link
|
||||
<input
|
||||
type="url" id="URL" name="URL"
|
||||
hx-post="/valid-link" hx-indicator="#url-validation-progress" required>
|
||||
hx-post="/valid-link"
|
||||
hx-indicator="#url-validation-progress" required>
|
||||
</label>
|
||||
<progress class="htmx-indicator" id="url-validation-progress"></progress>
|
||||
</div>
|
||||
<label>Format
|
||||
<select required>
|
||||
<option value="" disabled selected>Format</option>
|
||||
{{ range .Formats }} <option>{{ .VideoRes }}</option>{{ end }}
|
||||
</select>
|
||||
</label>
|
||||
</div>
|
||||
<!-- Checkboxes -->
|
||||
<fieldset>
|
||||
<label for="terms">
|
||||
<input type="checkbox" id="toaudio" name="toaudio" disabled>
|
||||
Convert to MP3 audio
|
||||
</label>
|
||||
</fieldset>
|
||||
<button id="get-btn">Get
|
||||
<!-- <a class="htmx-indicator" href="#" aria-busy="true"></a> -->
|
||||
</button>
|
||||
|
||||
</form>
|
||||
<progress class="htmx-indicator" id="progress"></progress>
|
||||
<script data-cfasync="false" type="text/javascript" src="//brightadnetwork.com/a/display.php?r=7439702"></script>
|
||||
|
Loading…
Reference in New Issue
Block a user