1
0
Fork 0
mirror of https://git.sr.ht/~cadence/cloudtube synced 2026-03-02 02:31:35 +00:00

Implement preferred quality selection

The list is subject to change as I collect more feedback. I just want
to get this initial change out for everyone to use and appreciate.
This commit is contained in:
Cadence Ember 2021-04-04 16:51:39 +12:00
parent fd854ec222
commit ac3de4b4e6
No known key found for this signature in database
GPG key ID: BC1C2C61CF521B17
6 changed files with 85 additions and 19 deletions

View file

@ -16,6 +16,10 @@ let constants = {
local: {
type: "boolean",
default: false
},
quality: {
type: "integer",
default: 0
}
},
@ -56,7 +60,8 @@ try {
const overrides = require("../config/config.js")
constants = mixin(constants, overrides)
} catch (e) {
console.log("Note: overrides file `config/config.js` ignored, file not found.")
console.error("Missing config file /config/config.js\nDocumentation: https://git.sr.ht/~cadence/tube-docs/tree/main/item/docs")
process.exit(1)
}
module.exports = constants

View file

@ -38,6 +38,11 @@ const deltas = [
function() {
db.prepare("UPDATE Settings SET instance = REPLACE(REPLACE(instance, '/', ''), ':', '://') WHERE instance LIKE '%/'")
.run()
},
// 5: Settings +quality
function() {
db.prepare("ALTER TABLE Settings ADD COLUMN quality INTEGER DEFAULT 0")
.run()
}
]