This commit is contained in:
UKDTOM 2021-04-05 22:18:51 +02:00
parent f8f0f4c667
commit 6bce15ecd7
3 changed files with 36 additions and 4 deletions

View file

@ -163,7 +163,17 @@
log.debug(`Customlevel ${this.selCustLevel} selected`);
if (this.selCustLevel != 'NewLevel'){
// Get fields from config.json file
const custLevel = wtconfig.get(`ET.CustomLevels.${this.selMediaType}.level.${this.selCustLevel}`)
let custLevel = wtconfig.get(`ET.CustomLevels.${this.selMediaType}.level.${this.selCustLevel}`)
// Do we need to export posters?
if ( wtconfig.get(`ET.CustomLevels.${this.selMediaType}.Posters.${this.selCustLevel}`, false) )
{
custLevel.push("Export Posters");
}
// Do we need to export arts?
if ( wtconfig.get(`ET.CustomLevels.${this.selMediaType}.Arts.${this.selCustLevel}`, false) )
{
custLevel.push("Export Arts");
}
// Add to resultList
this.resultList = custLevel.map((name, index) => {
return { name, order: index + 1, fixed: false };
@ -288,9 +298,25 @@
},
saveCustomLevel() {
let result = []
let bExportArts = false;
let bExportPosters = false;
for(var k in this.resultList) {
result.push(this.resultList[k].name);
if (this.resultList[k].name == 'Export Posters')
{
bExportPosters = true;
}
else if (this.resultList[k].name == 'Export Arts')
{
bExportArts = true;
}
else
{
result.push(this.resultList[k].name);
}
}
wtconfig.set(`ET.CustomLevels.${this.selMediaType}.Posters.${this.selCustLevel}`, bExportPosters);
wtconfig.set(`ET.CustomLevels.${this.selMediaType}.Arts.${this.selCustLevel}`, bExportArts);
// Get current level names
let curLevel = wtconfig.get(`ET.CustomLevels.${this.selMediaType}.level`);
// Add new level to JSON

View file

@ -418,12 +418,17 @@
"call": 1,
"type": "string"
},
"Export Arts":
{
"key": "$.ratingKey",
"call": 1,
"type": "string"
},
"Export Posters":
{
"key": "$.ratingKey",
"call": 1,
"type": "string",
"postProcess": true
"type": "string"
},
"Extras":
{

View file

@ -64,6 +64,7 @@
"Country",
"Directors",
"Duration",
"Export Arts",
"Export Posters",
"Extras",
"Extras-behindthescenes",