[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")
|
w = writeJSONResponse(w, "Provide URL as query")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
toAudio := r.FormValue("toaudio")
|
||||||
|
if toAudio == "on" {
|
||||||
|
log.Println("User requested audio")
|
||||||
|
}
|
||||||
|
|
||||||
downloadURL, err := getYoutubeDownloadURL(userURL)
|
downloadURL, err := getYoutubeDownloadURL(userURL)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -23,20 +23,28 @@
|
|||||||
<label data-tooltip="Link can be on any platform!">Link
|
<label data-tooltip="Link can be on any platform!">Link
|
||||||
<input
|
<input
|
||||||
type="url" id="URL" name="URL"
|
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>
|
</label>
|
||||||
<progress class="htmx-indicator" id="url-validation-progress"></progress>
|
<progress class="htmx-indicator" id="url-validation-progress"></progress>
|
||||||
</div>
|
</div>
|
||||||
<label>Format
|
<label>Format
|
||||||
<select required>
|
<select required>
|
||||||
<option value="" disabled selected>Format</option>
|
|
||||||
{{ range .Formats }} <option>{{ .VideoRes }}</option>{{ end }}
|
{{ range .Formats }} <option>{{ .VideoRes }}</option>{{ end }}
|
||||||
</select>
|
</select>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</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
|
<button id="get-btn">Get
|
||||||
<!-- <a class="htmx-indicator" href="#" aria-busy="true"></a> -->
|
<!-- <a class="htmx-indicator" href="#" aria-busy="true"></a> -->
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
<progress class="htmx-indicator" id="progress"></progress>
|
<progress class="htmx-indicator" id="progress"></progress>
|
||||||
<script data-cfasync="false" type="text/javascript" src="//brightadnetwork.com/a/display.php?r=7439702"></script>
|
<script data-cfasync="false" type="text/javascript" src="//brightadnetwork.com/a/display.php?r=7439702"></script>
|
||||||
|
Loading…
Reference in New Issue
Block a user