mirror of
https://github.com/WebTools-NG/WebTools-NG
synced 2024-11-26 21:10:19 +00:00
Fixed #345
This commit is contained in:
parent
1b09686145
commit
7bbf04ea57
3 changed files with 41 additions and 13 deletions
|
@ -256,6 +256,11 @@
|
|||
{
|
||||
return false;
|
||||
}
|
||||
else if ( this.selExpTypeSec == et.ETmediaType.Libraries)
|
||||
{
|
||||
this.$store.commit("UPDATE_EXPORTLEVEL", 'all');
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
|
@ -419,8 +424,16 @@
|
|||
this.selMediaType = arguments[0]
|
||||
break;
|
||||
}
|
||||
this.getLibs();
|
||||
this.getLevels();
|
||||
log.verbose(`Export Sec type selected: ${arguments[0]}`);
|
||||
if ( arguments[0] == et.ETmediaType.Libraries)
|
||||
{
|
||||
log.info('Exporting library info');
|
||||
}
|
||||
else
|
||||
{
|
||||
this.getLibs();
|
||||
this.getLevels();
|
||||
}
|
||||
},
|
||||
selExpTypeMainChanged: async function(){
|
||||
this.optExpTypeSec = [];
|
||||
|
|
|
@ -136,7 +136,8 @@ const et = new class ET {
|
|||
log.debug(`Got Step size as: ${step}`)
|
||||
let libSize, libKey, element
|
||||
//if (libType != 'libraryInfo')
|
||||
if (['libraryInfo', 'playlistInfo'].indexOf(libType) < 0)
|
||||
//if (['libraryInfo', 'playlistInfo'].indexOf(libType) < 0)
|
||||
if ('playlistInfo' == libType)
|
||||
{
|
||||
log.info(`Starting getSectionData with Name: "${sectionName}" and with a type of: "${libType}" and a sec type of: "${libTypeSec}"`)
|
||||
// Get Section Key
|
||||
|
@ -151,7 +152,6 @@ const et = new class ET {
|
|||
element = '/library/sections/all';
|
||||
}
|
||||
// Now read the fields and level defs
|
||||
|
||||
// Current item
|
||||
let idx = 0
|
||||
// Now let's walk the section
|
||||
|
@ -168,7 +168,7 @@ const et = new class ET {
|
|||
element = '/playlists/' + libKey;
|
||||
postURI = `/items?X-Plex-Container-Start=${idx}&X-Plex-Container-Size=${step}`;
|
||||
}
|
||||
else if (libType == 'libraryInfo')
|
||||
else if (libType == 'libraries')
|
||||
{
|
||||
element = '/library/sections/all';
|
||||
postURI = `?X-Plex-Container-Start=${idx}&X-Plex-Container-Size=${step}`;
|
||||
|
@ -300,11 +300,18 @@ const et = new class ET {
|
|||
}
|
||||
|
||||
getLevelDisplayName(level, libType){
|
||||
console.log('Ged3', level, ' - ', libType)
|
||||
// return displayname for the buildin levels
|
||||
if (libType == 'playlist')
|
||||
{
|
||||
libType = libType + '-' + (et.RevETmediaType[store.getters.getSelectedLibTypeSec]).toString().toLowerCase();
|
||||
}
|
||||
if (libType == 'libraries')
|
||||
//if (libType == et.RevETmediaType.Libraries)
|
||||
{
|
||||
level = 'all'
|
||||
libType = 'libraryInfo';
|
||||
}
|
||||
const levels = et.getLevels(libType)
|
||||
let result = '';
|
||||
loop1:
|
||||
|
@ -352,6 +359,11 @@ const et = new class ET {
|
|||
pListType = (et.RevETmediaType[store.getters.getSelectedLibTypeSec]).toString().toLowerCase();
|
||||
libType = libType + '-' + (et.RevETmediaType[store.getters.getSelectedLibTypeSec]).toString().toLowerCase();
|
||||
}
|
||||
if (libType == 'libraries')
|
||||
{
|
||||
pListType = (et.RevETmediaType[store.getters.getSelectedLibTypeSec]).toString().toLowerCase();
|
||||
libType = 'libraryInfo';
|
||||
}
|
||||
let realName = et.getRealLevelName(level, libType);
|
||||
log.debug(`RealName is ${realName}`);
|
||||
// We need to load fields and defs into def var
|
||||
|
@ -424,7 +436,10 @@ const et = new class ET {
|
|||
{
|
||||
libType = libType + '-' + this.RevETmediaType[store.getters.getSelectedLibTypeSec].toLowerCase();
|
||||
}
|
||||
|
||||
else if (libType == 'libraries')
|
||||
{
|
||||
libType = 'libraryInfo';
|
||||
}
|
||||
const count = await defLevels[libType]['LevelCount'][level]
|
||||
log.debug('Count needed is: ' + count)
|
||||
return count
|
||||
|
@ -1311,13 +1326,13 @@ const excel2 = new class Excel {
|
|||
var sectionData, x;
|
||||
{
|
||||
// Get all the items in small chuncks
|
||||
sectionData = await et.getSectionData({sectionName: libName, baseURL: baseURL, accessToken: accessToken, libType: libType, libTypeSec: libTypeSec})
|
||||
log.verbose(`Amount of chunks in sectionData are: ${sectionData.length}`)
|
||||
let item
|
||||
let counter = 1
|
||||
sectionData = await et.getSectionData({sectionName: libName, baseURL: baseURL, accessToken: accessToken, libType: libType, libTypeSec: libTypeSec});
|
||||
log.verbose(`Amount of chunks in sectionData are: ${sectionData.length}`);
|
||||
let item;
|
||||
let counter = 1;
|
||||
const totalSize = JSONPath({path: '$..totalSize', json: sectionData[0]});
|
||||
let jPath, sectionChunk;
|
||||
if (libType == 'libraryInfo')
|
||||
if (libType == 'libraries')
|
||||
{
|
||||
jPath = "$.MediaContainer.Directory[*]";
|
||||
}
|
||||
|
|
|
@ -283,8 +283,8 @@ const wtutils = new class WTUtils {
|
|||
if ( wtconfig.get('PMS.ContainerSize.playlist', 'N/A') == 'N/A' ){
|
||||
wtconfig.set('PMS.ContainerSize.playlist', 20)
|
||||
}
|
||||
if ( wtconfig.get('PMS.ContainerSize.libraryInfo', 'N/A') == 'N/A' ){
|
||||
wtconfig.set('PMS.ContainerSize.libraryInfo', 20)
|
||||
if ( wtconfig.get('PMS.ContainerSize.libraries', 'N/A') == 'N/A' ){
|
||||
wtconfig.set('PMS.ContainerSize.libraries', 20)
|
||||
}
|
||||
if ( wtconfig.get('PMS.ContainerSize.playlistInfo', 'N/A') == 'N/A' ){
|
||||
wtconfig.set('PMS.ContainerSize.playlistInfo', 20)
|
||||
|
|
Loading…
Reference in a new issue