new: option to prevent auto start fixes: #15
This commit is contained in:
parent
ff5fc0558d
commit
f166f505c9
|
|
@ -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: {
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Reference in New Issue