Updates from last night

This commit is contained in:
Luke Hagar
2022-07-26 06:44:57 -05:00
parent f2fd610b62
commit 30781c659f
2 changed files with 22 additions and 18 deletions

View File

@@ -278,7 +278,7 @@ export class PlexAPIOAuth {
} }
async GetPlexLibraries() { async GetPlexLibraries() {
await this.plexServers?.forEach(async (server) => { this.plexServers?.forEach(async (server) => {
let response = await axios({ let response = await axios({
method: "GET", method: "GET",
url: url:
@@ -316,10 +316,11 @@ export class PlexAPIOAuth {
console.log(server); console.log(server);
this.plexServers[server] = server; this.plexServers[server] = server;
}); });
return true;
} }
async GetPlexLibraryContent(server, library) { async GetPlexLibraryContent() {
this.plexServers?.forEach(async (server) => {
await server?.plexLibraries?.forEach(async (library) => {
let response = await axios({ let response = await axios({
method: "GET", method: "GET",
url: url:
@@ -335,6 +336,9 @@ export class PlexAPIOAuth {
throw err; throw err;
}); });
console.log(response); console.log(response);
});
});
return true; return true;
// this.plexMusic = response?.data?.MediaContainer?.Directory; // this.plexMusic = response?.data?.MediaContainer?.Directory;

View File

@@ -1,6 +1,6 @@
{ {
"name": "plex-api-oauth", "name": "plex-api-oauth",
"version": "1.0.127", "version": "1.0.128",
"description": "An NPM Module designed to make Plex Media Server and plex.tv API calls easier to implement in JavaScript and React projects", "description": "An NPM Module designed to make Plex Media Server and plex.tv API calls easier to implement in JavaScript and React projects",
"main": "index.mjs", "main": "index.mjs",
"type": "module", "type": "module",