mirror of
https://github.com/FoxxMD/multi-scrobbler.git
synced 2026-09-03 05:10:00 +03:00
feat: Revert specific config requirement to be a top-level array
Wasn't really necessary and would cause breaking change for existing configs.
This commit is contained in:
@@ -137,8 +137,10 @@ export default class ScrobbleClients {
|
||||
} else if(rawClientConfigs === null) {
|
||||
this.logger.error(`${clientType}.json contained no data`);
|
||||
continue;
|
||||
} else if(typeof rawClientConfigs === 'object') {
|
||||
clientConfigs = [rawClientConfigs];
|
||||
} else {
|
||||
this.logger.error(`All top level data from ${clientType}.json must be an array of objects, will not parse configs from file`);
|
||||
this.logger.error(`All top level data from ${clientType}.json must be an object or an array of objects, will not parse configs from file`);
|
||||
continue;
|
||||
}
|
||||
for(const [i,rawConf] of rawClientConfigs.entries()) {
|
||||
|
||||
@@ -216,8 +216,10 @@ export default class ScrobbleSources {
|
||||
} else if (rawSourceConfigs === null) {
|
||||
this.logger.error(`${sourceType}.json contained no data`);
|
||||
continue;
|
||||
} else if (typeof rawSourceConfigs === 'object') {
|
||||
sourceConfigs = [rawSourceConfigs];
|
||||
} else {
|
||||
this.logger.error(`All top level data from ${sourceType}.json must be an array of objects, will not parse configs from file`);
|
||||
this.logger.error(`All top level data from ${sourceType}.json must be an object or an array of objects, will not parse configs from file`);
|
||||
continue;
|
||||
}
|
||||
for (const [i,rawConf] of sourceConfigs.entries()) {
|
||||
|
||||
Reference in New Issue
Block a user