mirror of
https://github.com/WebTools-NG/WebTools-NG
synced 2024-11-26 04:50:18 +00:00
GetSectionSize fixed for Libraries type exp.
This commit is contained in:
parent
12eb781d11
commit
2a0cc2b6f0
2 changed files with 15 additions and 2 deletions
|
@ -16,7 +16,6 @@ import i18n from '../../../../i18n'
|
|||
import {ipcRenderer} from 'electron';
|
||||
//const fs = require('fs');
|
||||
|
||||
|
||||
var path = require("path");
|
||||
|
||||
const fetch = require('node-fetch');
|
||||
|
|
|
@ -705,7 +705,18 @@ const etHelper = new class ETHELPER {
|
|||
|
||||
async getSectionSize()
|
||||
{
|
||||
const url = this.Settings.baseURL + '/library/sections/' + this.Settings.selLibKey + '/all?X-Plex-Container-Start=0&X-Plex-Container-Size=0&type=' + this.Settings.selType;
|
||||
let url = this.Settings.baseURL + '/library/sections/' + this.Settings.selLibKey + '/all?X-Plex-Container-Start=0&X-Plex-Container-Size=0';
|
||||
const noSelTypeArr=[this.ETmediaType.Libraries];
|
||||
if (!noSelTypeArr.includes(this.Settings.selType))
|
||||
{
|
||||
url += '&type=' + this.Settings.selType;
|
||||
log.silly('getSectionSize arr: ' + JSON.stringify(noSelTypeArr) + ' and testing against: ' + this.Settings.selType);
|
||||
log.silly(`So adding "&type=${this.Settings.selType}"" to the url`)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
this.PMSHeader["X-Plex-Token"] = this.Settings.accessToken;
|
||||
log.verbose(`Calling url in getSectionSize: ${url}`)
|
||||
let response = await fetch(url, { method: 'GET', headers: this.PMSHeader});
|
||||
|
@ -1139,7 +1150,10 @@ const etHelper = new class ETHELPER {
|
|||
|
||||
// Private methode to set the header
|
||||
async #SetFieldHeader(){
|
||||
//if (this.Settings.Level)
|
||||
console.log('Ged 11: Level: ' + this.Settings.Level)
|
||||
log.verbose(`GetFieldHeader level: ${this.Settings.Level} - libType: ${this.Settings.libType}`);
|
||||
|
||||
//const fields2 = await this.getLevelFields(this.Settings.Level);
|
||||
//return fields2;
|
||||
return await this.getLevelFields();
|
||||
|
|
Loading…
Reference in a new issue