new: option to prevent auto start fixes: #15

This commit is contained in:
Raphael Mutschler 2024-03-22 18:10:14 +01:00
parent ff5fc0558d
commit f166f505c9
2 changed files with 6 additions and 2 deletions

View File

@ -26,15 +26,18 @@ function sendVideoUrlToMetube(videoUrl, metubeUrl, format, advancedSettings, cal
let postData = {
"quality": "best",
"format": format,
"url": videoUrl
"url": videoUrl,
'auto_start': !advancedSettings['disable_auto_start']
}
Object.keys(advancedSettings).forEach((key) => {
if (advancedSettings[key]) {
if (advancedSettings[key] && !['disable_auto_start'].includes(key) ) {
postData[key] = hostname.startsWith('www.') ? hostname.replace('www.', '') : hostname
}
})
console.log(postData)
fetch(metubeUrl + "/add", {
method: 'POST',
headers: {

View File

@ -58,6 +58,7 @@
<div id="advanced_settings">
<input type="checkbox" name="folder" id="folder" value="true"><label for="folder">Use subfolder based on the Hostname of the URL</label><br>
<input type="checkbox" name="custom_name_prefix" id="custom_name_prefix" value="true"><label for="custom_name_prefix">Use name-prefix based on the Hostname of the URL</label><br>
<input type="checkbox" name="disable_auto_start" id="disable_auto_start" value="true"><label for="disable_auto_start">Disable auto start of Downloads</label><br>
</div>
<h3>Additional sites</h3>