mirror of
https://github.com/WebTools-NG/WebTools-NG
synced 2024-11-25 20:40:19 +00:00
Fixed #249
This commit is contained in:
parent
1524f6aeac
commit
a739c6097a
3 changed files with 22 additions and 14 deletions
|
@ -7,6 +7,7 @@
|
|||
* [#242 Button or setting to restore WebTools-NG default settings](https://github.com/WebTools-NG/WebTools-NG/issues/242)
|
||||
* [#225 Cutdown on buildin levels](https://github.com/WebTools-NG/WebTools-NG/issues/225)
|
||||
* [#183 Export description with a linebreak fails](https://github.com/WebTools-NG/WebTools-NG/issues/183)
|
||||
* [#249 Default "Sort Title" to "Title", if empty](https://github.com/WebTools-NG/WebTools-NG/issues/249)
|
||||
|
||||
## V0.1.14
|
||||
|
||||
|
|
|
@ -110,7 +110,7 @@
|
|||
"level1": [
|
||||
"Media ID",
|
||||
"Series Title",
|
||||
"Episode Sort Title",
|
||||
"Sort title",
|
||||
"Episode Title",
|
||||
"Year",
|
||||
"Season",
|
||||
|
@ -123,7 +123,7 @@
|
|||
"level2": [
|
||||
"Media ID",
|
||||
"Series Title",
|
||||
"Episode Sort Title",
|
||||
"Sort title",
|
||||
"Episode Title",
|
||||
"Year",
|
||||
"Season",
|
||||
|
@ -144,7 +144,7 @@
|
|||
"all": [
|
||||
"Media ID",
|
||||
"Series Title",
|
||||
"Episode Sort Title",
|
||||
"Sort title",
|
||||
"Episode Title",
|
||||
"Year",
|
||||
"Season",
|
||||
|
@ -176,11 +176,12 @@
|
|||
"call": 1,
|
||||
"type": "string"
|
||||
},
|
||||
"Episode Sort Title":
|
||||
"Sort title":
|
||||
{
|
||||
"key": "$.titleSort",
|
||||
"call": 1,
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"postProcess": true
|
||||
},
|
||||
"Episode Title":
|
||||
{
|
||||
|
|
|
@ -454,7 +454,7 @@ const excel2 = new class Excel {
|
|||
|
||||
async AddHeader(Sheet, Level, libType) {
|
||||
const columns = []
|
||||
log.verbose(`AddHeader sheet: ${Sheet} - level: ${Level} - libType: ${libType}`)
|
||||
log.verbose(`AddHeader level: ${Level} - libType: ${libType}`)
|
||||
// Get level fields
|
||||
const fields = et.getLevelFields(Level, libType)
|
||||
for (var i=0; i<fields.length; i++) {
|
||||
|
@ -518,7 +518,7 @@ const excel2 = new class Excel {
|
|||
const valArray = val.split(wtconfig.get('ET.ArraySep', ' - '));
|
||||
let retArray = [];
|
||||
let x, retVal, start, strStart, end, result;
|
||||
try {
|
||||
try {
|
||||
switch ( String(name) ){
|
||||
case "MetaDB Link":
|
||||
for (x=0; x<valArray.length; x++) {
|
||||
|
@ -565,12 +565,12 @@ const excel2 = new class Excel {
|
|||
retVal = val;
|
||||
}
|
||||
break;
|
||||
case "Sort title":
|
||||
case "Sort title":
|
||||
if (wtconfig.get('ET.SortTitleNull'))
|
||||
{
|
||||
{
|
||||
// Override with title if not found
|
||||
if (val == wtconfig.get('ET.NotAvail'))
|
||||
{
|
||||
if (val == wtconfig.get('ET.TextQualifierCSV') + 'undefined' + wtconfig.get('ET.TextQualifierCSV'))
|
||||
{
|
||||
retVal = title;
|
||||
}
|
||||
else {
|
||||
|
@ -578,8 +578,14 @@ const excel2 = new class Excel {
|
|||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
retVal = val;
|
||||
{
|
||||
if (val == wtconfig.get('ET.TextQualifierCSV') + 'undefined' + wtconfig.get('ET.TextQualifierCSV'))
|
||||
{
|
||||
retVal = wtconfig.get('ET.NotAvail');
|
||||
}
|
||||
else {
|
||||
retVal = val;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case "IMDB":
|
||||
|
@ -742,7 +748,7 @@ const excel2 = new class Excel {
|
|||
if ( doPostProc == 'true')
|
||||
{
|
||||
if (!["Original Title","Sort title"].includes(name)){
|
||||
const title = JSONPath({path: String('$.title'), json: data})[0];
|
||||
const title = JSONPath({path: String('$.title'), json: data})[0];
|
||||
val = await this.postProcess( {name: name, val: val, title: title} );
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Reference in a new issue