1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-03 09:49:20 +02:00

Add defaults values config in web admin

This commit is contained in:
Chocobozzz 2025-06-13 15:36:19 +02:00
parent eb11e5793f
commit e9bb222b6c
No known key found for this signature in database
GPG key ID: 583A612D890159BE
9 changed files with 241 additions and 40 deletions

View file

@ -537,12 +537,13 @@ function convertCustomConfigBody (body: CustomConfig) {
// Transcoding resolutions exception
if (/^\d{3,4}p$/.exec(k)) return k
if (k === '0p') return k
if (k === 'p2p') return k
return snakeCase(k)
}
function valueConverter (v: any) {
if (validator.default.isNumeric(v + '')) return parseInt('' + v, 10)
if (validator.isNumeric(v + '')) return parseInt('' + v, 10)
return v
}