Add: Support for folders in getSectionDataWithoutProcessing

pull/52/head
Juraj Nyíri 3 years ago
parent 6152c3b359
commit 8a888ac0fd

@ -18863,11 +18863,21 @@ class Plex {
};
this.getSectionDataWithoutProcessing = async (sectionID, type = false) => {
const bulkItems = 50;
let url = this.authorizeURL(`${this.getBasicURL()}/library/sections/${sectionID}/all`);
url += `&sort=${this.sort}`;
let url = `${this.getBasicURL()}/library/sections/${sectionID}`;
if (type) {
url += `&type=${type}`;
if (lodash.isEqual(type, 'folder')) {
url += `/folder`;
}
else {
url += `/all`;
url += `?type=${type}`;
}
}
else {
url += `/all`;
}
url = this.authorizeURL(url);
url += `&sort=${this.sort}`;
url += `&includeCollections=1&includeExternalMedia=1&includeAdvanced=1&includeMeta=1`;
let result = {};
try {

@ -259,11 +259,19 @@ class Plex {
private getSectionDataWithoutProcessing = async (sectionID: string, type: string | false = false): Promise<any> => {
const bulkItems = 50;
let url = this.authorizeURL(`${this.getBasicURL()}/library/sections/${sectionID}/all`);
url += `&sort=${this.sort}`;
let url = `${this.getBasicURL()}/library/sections/${sectionID}`;
if (type) {
url += `&type=${type}`;
if (_.isEqual(type, 'folder')) {
url += `/folder`;
} else {
url += `/all`;
url += `?type=${type}`;
}
} else {
url += `/all`;
}
url = this.authorizeURL(url);
url += `&sort=${this.sort}`;
url += `&includeCollections=1&includeExternalMedia=1&includeAdvanced=1&includeMeta=1`;
let result: Record<string, any> = {};
try {

Loading…
Cancel
Save