This commit is contained in:
Tommy Mikkelsen 2022-06-03 01:14:26 +02:00
parent 67073d9750
commit 73733b871d
7 changed files with 247 additions and 9 deletions

View file

@ -1,5 +1,18 @@
# ![Logo](https://github.com/WebTools-NG/WebTools-NG/blob/master/src/assets/WebTools-48x48.png) WebTools-ng Change log # ![Logo](https://github.com/WebTools-NG/WebTools-NG/blob/master/src/assets/WebTools-48x48.png) WebTools-ng Change log
## V0.3.18 (Not Yet Released)
**Note**: This version is a Beta version
**Note 2**: In this version, the following is disabled:
* Export to xlsx format ([See #331](https://github.com/WebTools-NG/WebTools-NG/issues/331))
* Photo export
**Changes**:
* [#498 Add preferences to shows export](https://github.com/WebTools-NG/WebTools-NG/issues/498)
## V0.3.17 (20220601) ## V0.3.17 (20220601)
**Note**: This version is a Beta version **Note**: This version is a Beta version

View file

@ -1,7 +1,7 @@
{ {
"name": "webtools-ng", "name": "webtools-ng",
"productName": "WebTools-NG", "productName": "WebTools-NG",
"version": "0.3.17", "version": "0.3.18",
"description": "WebTools Next Generation 4 Plex", "description": "WebTools Next Generation 4 Plex",
"author": "dane22 & CPSO", "author": "dane22 & CPSO",
"license": "MPL-2.0", "license": "MPL-2.0",

View file

@ -1092,6 +1092,62 @@
"call": 1, "call": 1,
"type": "string" "type": "string"
}, },
"Show Prefs Delete episodes after playing":
{
"key": "$..Preferences.Setting[?(@.id=='autoDeletionItemPolicyWatchedLibrary')].value",
"call": 2,
"type": "int",
"include": "includePreferences=1",
"postProcess": true
},
"Show Prefs Episode ordering":
{
"key": "$..Preferences.Setting[?(@.id=='showOrdering')].value",
"call": 2,
"type": "string",
"include": "includePreferences=1",
"postProcess": true
},
"Show Prefs Episode sorting":
{
"key": "$..Preferences.Setting[?(@.id=='episodeSort')].value",
"call": 2,
"type": "string",
"include": "includePreferences=1",
"postProcess": true
},
"Show Prefs Keep":
{
"key": "$..Preferences.Setting[?(@.id=='autoDeletionItemPolicyUnwatchedLibrary')].value",
"call": 2,
"type": "int",
"include": "includePreferences=1",
"postProcess": true
},
"Show Prefs Metadata language":
{
"key": "$..Preferences.Setting[?(@.id=='languageOverride')].value",
"call": 2,
"type": "int",
"include": "includePreferences=1",
"postProcess": true
},
"Show Prefs Seasons":
{
"key": "$..Preferences.Setting[?(@.id=='flattenSeasons')].value",
"call": 2,
"type": "int",
"include": "includePreferences=1",
"postProcess": true
},
"Show Prefs Use original title":
{
"key": "$..Preferences.Setting[?(@.id=='useOriginalTitle')].value",
"call": 2,
"type": "int",
"include": "includePreferences=1",
"postProcess": true
},
"Show Title": "Show Title":
{ {
"key": "$.parentTitle", "key": "$.parentTitle",

View file

@ -78,7 +78,7 @@
"Include": { "Include": {
"Level 1": "", "Level 1": "",
"Level 2": "", "Level 2": "",
"all": "" "all": "includePreferences=1"
} }
}, },
"10": { "10": {

View file

@ -50,6 +50,13 @@
"Rating", "Rating",
"Release Date", "Release Date",
"Roles", "Roles",
"Show Prefs Delete episodes after playing",
"Show Prefs Episode ordering",
"Show Prefs Episode sorting",
"Show Prefs Keep",
"Show Prefs Metadata language",
"Show Prefs Seasons",
"Show Prefs Use original title",
"Show Title", "Show Title",
"Similar", "Similar",
"Sort title", "Sort title",

View file

@ -404,6 +404,53 @@ const etHelper = new class ETHELPER {
}; };
this.intSep = '{*WTNG-ET*}'; this.intSep = '{*WTNG-ET*}';
this.StackedFilesName = ['cd', 'disc', 'dvd', 'part', 'pt']; this.StackedFilesName = ['cd', 'disc', 'dvd', 'part', 'pt'];
this.MetadataLang = {
"": "Library default",
"ar-SA": "Arabic (Saudi Arabia)",
"bg-BG": "Bulgarian",
"ca-ES": "Catalan",
"zh-CN": "Chinese",
"zh-HK": "Chinese (Hong Kong)",
"zh-TW": "Chinese (Taiwan)",
"hr-HR": "Croatian",
"cs-CZ": "Czech",
"da-DK": "Danish",
"nl-NL": "Dutch",
"en-US": "English",
"en-AU": "English (Australia)",
"en-CA": "English (Canada)",
"en-GB": "English (UK)",
"et-EE": "Estonian",
"fi-FI": "Finnish",
"fr-FR": "French",
"fr-CA": "French (Canada)",
"de-DE": "German",
"el-GR": "Greek",
"he-IL": "Hebrew",
"hi-IN": "Hindi",
"hu-HU": "Hungarian",
"id-ID": "Indonesian",
"it-IT": "Italian",
"ja-JP": "Japanese",
"ko-KR": "Korean",
"lv-LV": "Latvian",
"lt-LT": "Lithuanian",
"nb-NO": "Norwegian Bokmål",
"fa-IR": "Persian",
"pl-PL": "Polish",
"pt-BR": "Portuguese",
"pt-PT": "Portuguese (Portugal)",
"ro-RO": "Romanian",
"ru-RU": "Russian",
"sk-SK": "Slovak",
"es-ES": "Spanish",
"es-MX": "Spanish (Mexico)",
"sv-SE": "Swedish",
"th-TH": "Thai",
"tr-TR": "Turkish",
"uk-UA": "Ukrainian",
"vi-VN": "Vietnamese"
}
} }
resetETHelper() { resetETHelper() {
@ -850,6 +897,126 @@ const etHelper = new class ETHELPER {
//var path = require('path'); //var path = require('path');
retVal = path.join('Metadata', libTypeName, sha1[0], sha1.slice(1) + '.bundle'); retVal = path.join('Metadata', libTypeName, sha1[0], sha1.slice(1) + '.bundle');
break; break;
case "Show Prefs Episode sorting":
switch (val){
case "-1":
retVal = "Library default";
break;
case "0":
retVal = "Oldest first";
break;
case "1":
retVal = "Newest first";
break;
default:
retVal = wtconfig.get('ET.NotAvail');
break;
}
break;
case "Show Prefs Keep":
switch (val){
case "0":
retVal = "All episodes";
break;
case "5":
retVal = "5 latest episodes";
break;
case "3":
retVal = "3 latest episodes";
break;
case "1":
retVal = "Latest episode";
break;
case "-3":
retVal = "Episodes added in the past 3 days";
break;
case "-7":
retVal = "Episodes added in the past 7 days";
break;
case "-30":
retVal = "Episodes added in the past 30 days";
break;
default:
retVal = wtconfig.get('ET.NotAvail');
break;
}
break;
case "Show Prefs Delete episodes after playing":
switch (val){
case "0":
retVal = "Never";
break;
case "1":
retVal = "After a day";
break;
case "7":
retVal = "After a week";
break;
case "100":
retVal = "On next refresh";
break;
default:
retVal = wtconfig.get('ET.NotAvail');
break;
}
break;
case "Show Prefs Seasons":
switch (val){
case "-1":
retVal = "Library default";
break;
case "0":
retVal = "Show";
break;
case "1":
retVal = "Hide";
break;
default:
retVal = wtconfig.get('ET.NotAvail');
break;
}
break;
case "Show Prefs Episode ordering":
switch (val){
case wtconfig.get('ET.NotAvail'):
retVal = "Library default";
break;
case "tmdbAiring":
retVal = "The Movie Database (Aired)";
break;
case "aired":
retVal = "TheTVDB (Aired)";
break;
case "dvd":
retVal = "TheTVDB (DVD)";
break;
case "absolute":
retVal = "TheTVDB (Absolute)";
break;
default:
retVal = wtconfig.get('ET.NotAvail');
break;
}
break;
case "Show Prefs Metadata language":
retVal = this.MetadataLang[val];
break;
case "Show Prefs Use original title":
switch (val){
case "-1":
retVal = "Library default";
break;
case "0":
retVal = "No";
break;
case "1":
retVal = "Yes";
break;
default:
retVal = wtconfig.get('ET.NotAvail');
break;
}
break;
default: default:
log.error(`[ethelper.js] (postProcess) no hit for: ${name}`) log.error(`[ethelper.js] (postProcess) no hit for: ${name}`)
break; break;

View file

@ -158,14 +158,9 @@ const time = new class Time {
} }
else { else {
const options = { dateStyle: wtconfig.get('General.DateOption'), timeStyle: wtconfig.get('General.TimeOption') }; const options = { dateStyle: wtconfig.get('General.DateOption'), timeStyle: wtconfig.get('General.TimeOption') };
console.log('Ged 17-1: ' + datetime)
console.log('Ged 17-2: ' + localFormat)
console.log(new Intl.DateTimeFormat(localFormat, options).format(datetime)); console.log(new Intl.DateTimeFormat(localFormat, options).format(datetime));
return new Intl.DateTimeFormat(localFormat, options).format(datetime); return new Intl.DateTimeFormat(localFormat, options).format(datetime);
} }
} }
async convertToLocalTime( time ){ async convertToLocalTime( time ){