mirror of
https://github.com/WebTools-NG/WebTools-NG
synced 2024-11-26 21:10:19 +00:00
Fixed #332
This commit is contained in:
parent
1c1bf8e068
commit
5f4e205381
6 changed files with 79 additions and 10 deletions
|
@ -140,7 +140,7 @@
|
|||
{ text: i18n.t('Modules.ET.RadioAudioTrack'), value: 'track', disabled: false },
|
||||
{ text: i18n.t('Modules.ET.RadioPhotos'), value: 'photo', disabled: false },
|
||||
{ text: i18n.t('Modules.ET.RadioPlayLists'), value: 'playlist', disabled: false },
|
||||
{ text: i18n.t('Modules.ET.RadioPlayListsInfo'), value: 'playlistInfo', disabled: true },
|
||||
{ text: i18n.t('Modules.ET.RadioPlayListsInfo'), value: 'playlistInfo', disabled: false },
|
||||
{ text: i18n.t('Modules.ET.RadioLibraryInfo'), value: 'libraryInfo', disabled: false }
|
||||
],
|
||||
optionsPlaylistType: [
|
||||
|
@ -160,7 +160,7 @@
|
|||
this.selLibraryWait = true;
|
||||
},
|
||||
selLibrary: async function(){
|
||||
if (['libraryInfo'].indexOf(this.selMediaType) > -1)
|
||||
if (['libraryInfo', 'playlistInfo'].indexOf(this.selMediaType) > -1)
|
||||
{
|
||||
this.btnDisable = false;
|
||||
this.selMediaType = '';
|
||||
|
@ -176,7 +176,7 @@
|
|||
}
|
||||
},
|
||||
selMediaType: async function(){
|
||||
if (['libraryInfo'].indexOf(this.selMediaType) > -1)
|
||||
if (['libraryInfo', 'playlistInfo'].indexOf(this.selMediaType) > -1)
|
||||
{
|
||||
this.btnDisable = false
|
||||
}
|
||||
|
@ -184,12 +184,13 @@
|
|||
{
|
||||
this.btnDisable=!(this.selLibrary!=='Loading...' && this.selLevel!=='');
|
||||
}
|
||||
this.pListGrpDisabled = (this.selMediaType == 'playlist');
|
||||
},
|
||||
selectedServerAddressUpdateInProgress: async function(){
|
||||
this.selLibraryWait = false;
|
||||
},
|
||||
selLevel: async function(){
|
||||
if (['libraryInfo'].indexOf(this.selMediaType) > -1)
|
||||
if (['libraryInfo', 'playlistInfo'].indexOf(this.selMediaType) > -1)
|
||||
{
|
||||
this.btnDisable = false
|
||||
}
|
||||
|
@ -347,6 +348,11 @@
|
|||
this.etLibraryGroupDisabled = true;
|
||||
this.etLevelGroupDisabled = true;
|
||||
break;
|
||||
case 'playlistInfo':
|
||||
this.pListGrpDisabled = true;
|
||||
this.etLibraryGroupDisabled = true;
|
||||
this.etLevelGroupDisabled = true;
|
||||
break;
|
||||
default:
|
||||
this.pListGrpDisabled = true;
|
||||
this.etLibraryGroupDisabled = false;
|
||||
|
|
|
@ -532,6 +532,12 @@
|
|||
"subtype": "time",
|
||||
"subkey": "$.endTimeOffset"
|
||||
},
|
||||
"Item Counts":
|
||||
{
|
||||
"key": "$.leafCount",
|
||||
"call": 1,
|
||||
"type": "string"
|
||||
},
|
||||
"Key":
|
||||
{
|
||||
"key": "$.ratingKey",
|
||||
|
@ -943,6 +949,12 @@
|
|||
"call": 1,
|
||||
"type": "string"
|
||||
},
|
||||
"Playlist Type":
|
||||
{
|
||||
"key": "$.playlistType",
|
||||
"call": 1,
|
||||
"type": "string"
|
||||
},
|
||||
"Poster url":
|
||||
{
|
||||
"key": "$.thumb",
|
||||
|
@ -1007,6 +1019,12 @@
|
|||
"subtype": "string",
|
||||
"subkey": "$.tag"
|
||||
},
|
||||
"Smart":
|
||||
{
|
||||
"key": "$.smart",
|
||||
"call": 1,
|
||||
"type": "string"
|
||||
},
|
||||
"Sort title":
|
||||
{
|
||||
"key": "$.titleSort",
|
||||
|
|
|
@ -129,5 +129,13 @@
|
|||
"LevelCount": {
|
||||
"All": 1
|
||||
}
|
||||
},
|
||||
"playlistInfo": {
|
||||
"levels": {
|
||||
"All": "all"
|
||||
},
|
||||
"LevelCount": {
|
||||
"All": 1
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"playlistInfo": {
|
||||
"level": {
|
||||
"all": [
|
||||
"Added",
|
||||
"Key",
|
||||
"Item Counts",
|
||||
"Last Viewed at",
|
||||
"Playlist Type",
|
||||
"Smart",
|
||||
"Sort title",
|
||||
"Summary",
|
||||
"Title",
|
||||
"Type",
|
||||
"Updated",
|
||||
"View Count"
|
||||
],
|
||||
"Ged": [
|
||||
"content - 2 calls"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
|
@ -65,7 +65,8 @@ const et = new class ET {
|
|||
const step = wtconfig.get("PMS.ContainerSize." + libType)
|
||||
log.debug(`Got Step size as: ${step}`)
|
||||
let libSize, libKey, element
|
||||
if (libType != 'libraryInfo')
|
||||
//if (libType != 'libraryInfo')
|
||||
if (['libraryInfo', 'playlistInfo'].indexOf(libType) < 0)
|
||||
{
|
||||
log.info(`Starting getSectionData with Name: "${sectionName}" and with a type of: "${libType}"`)
|
||||
// Get Section Key
|
||||
|
@ -74,7 +75,7 @@ const et = new class ET {
|
|||
// Get the size of the library
|
||||
libSize = await et.getSectionSizeByKey({sectionKey: libKey, baseURL: baseURL, accessToken: accessToken, libType: libType})
|
||||
log.debug(`Got Section size as: ${libSize}`);
|
||||
element = '/library/sections/' + libKey;
|
||||
// element = '/library/sections/' + libKey;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -102,9 +103,15 @@ const et = new class ET {
|
|||
element = '/library/sections/all';
|
||||
postURI = `?X-Plex-Container-Start=${idx}&X-Plex-Container-Size=${step}`;
|
||||
}
|
||||
else if (libType == 'playlistInfo')
|
||||
{
|
||||
element = '/playlists/all';
|
||||
postURI = `?X-Plex-Container-Start=${idx}&X-Plex-Container-Size=${step}`;
|
||||
}
|
||||
else
|
||||
{
|
||||
postURI = `/all?X-Plex-Container-Start=${idx}&X-Plex-Container-Size=${step}&type=${this.mediaType[libType]}&${this.uriParams}`;
|
||||
element = '/library/sections/' + libKey + '/all';
|
||||
postURI = `?X-Plex-Container-Start=${idx}&X-Plex-Container-Size=${step}&type=${this.mediaType[libType]}&${this.uriParams}`;
|
||||
}
|
||||
log.info(`Calling url ${baseURL + element + postURI}`);
|
||||
chuncks = await et.getItemData({baseURL: baseURL, accessToken: accessToken, element: element, postURI: postURI});
|
||||
|
@ -161,7 +168,7 @@ const et = new class ET {
|
|||
getRealLevelName(level, libType) {
|
||||
// First get the real name of the level, and not just the display name
|
||||
let levelName
|
||||
if (['libraryInfo'].indexOf(libType) > -1)
|
||||
if (['libraryInfo', 'playlistInfo'].indexOf(libType) > -1)
|
||||
{
|
||||
levelName = 'all';
|
||||
}
|
||||
|
@ -317,6 +324,9 @@ const et = new class ET {
|
|||
case 'libraryInfo':
|
||||
def = JSON.parse(JSON.stringify(require('./../defs/def-LibraryInfo.json')));
|
||||
break;
|
||||
case 'playlistInfo':
|
||||
def = JSON.parse(JSON.stringify(require('./../defs/def-PlaylistInfo.json')));
|
||||
break;
|
||||
default:
|
||||
// code block
|
||||
log.error(`Unknown libtype: "${libType}" or level: "${level}" in "getLevelFields"`);
|
||||
|
@ -1125,6 +1135,10 @@ const excel2 = new class Excel {
|
|||
{
|
||||
jPath = "$.MediaContainer.Directory[*]";
|
||||
}
|
||||
else if (libType == 'playlistInfo')
|
||||
{
|
||||
jPath = "$.MediaContainer.Metadata[*]";
|
||||
}
|
||||
else
|
||||
{
|
||||
jPath = "$.MediaContainer.Metadata[*]";
|
||||
|
|
|
@ -51,9 +51,9 @@ const actions = {
|
|||
var accessToken = getters.getSelectedServerToken;
|
||||
var libType = getters.getLibType;
|
||||
var pListType = getters.getSelectedPListType;
|
||||
let levelName;
|
||||
let levelName;
|
||||
var libName = et.getLibDisplayName(getters.getSelectedSection, getters.getPmsSections);
|
||||
if (libType == 'libraryInfo')
|
||||
if (['libraryInfo', 'playlistInfo'].indexOf(libType) > -1)
|
||||
{
|
||||
levelName = 'All'
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue