1
0
Fork 0
mirror of https://git.sr.ht/~cadence/cloudtube synced 2026-05-26 12:32:25 +00:00

Add local fetch option

This commit is contained in:
Cadence Ember 2020-10-26 20:29:05 +13:00
parent f78ee4ff0f
commit 9a890574d5
No known key found for this signature in database
GPG key ID: BC1C2C61CF521B17
7 changed files with 107 additions and 45 deletions

View file

@ -37,9 +37,8 @@ module.exports = [
if (isNaN(provided)) data[key] = null
else data[key] = +provided
} else if (setting.type === "boolean") {
if (provided === "true") data[key] = true
else if (provided === "false") data[key] = false
else data[key] = null
if (provided === "1") data[key] = 1
else data[key] = 0
} else {
throw new Error("Unsupported setting type: "+setting.type)
}