mirror of
https://gitlab.com/RemixDev/deemix-js.git
synced 2024-12-28 02:16:08 +00:00
Fixed settings check issues
This commit is contained in:
parent
e93981fcf9
commit
229d3d764e
|
@ -49,7 +49,7 @@ const DEFAULTS = {
|
|||
syncedLyrics: false,
|
||||
embeddedArtworkSize: 800,
|
||||
embeddedArtworkPNG: false,
|
||||
localArtworkSize: 1400,
|
||||
localArtworkSize: 1200,
|
||||
localArtworkFormat: "jpg",
|
||||
saveArtwork: true,
|
||||
coverImageTemplate: "cover",
|
||||
|
@ -121,13 +121,13 @@ function load(configFolder){
|
|||
function check(settings){
|
||||
let changes = 0
|
||||
Object.keys(DEFAULTS).forEach( _iSet => {
|
||||
if (! settings[_iSet] || typeof settings[_iSet] != DEFAULTS[_iSet]){
|
||||
if (settings[_iSet] === undefined || typeof settings[_iSet] != typeof DEFAULTS[_iSet]){
|
||||
settings[_iSet] = DEFAULTS[_iSet]
|
||||
changes++
|
||||
}
|
||||
})
|
||||
Object.keys(DEFAULTS.tags).forEach( _iSet => {
|
||||
if (! settings.tags[_iSet] || typeof settings.tags[_iSet] != DEFAULTS.tags[_iSet]){
|
||||
if (settings.tags[_iSet] === undefined || typeof settings.tags[_iSet] != typeof DEFAULTS.tags[_iSet]){
|
||||
settings.tags[_iSet] = DEFAULTS.tags[_iSet]
|
||||
changes++
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue