mirror of
https://github.com/LukeHagar/plex-api-oauth.git
synced 2025-12-06 12:37:50 +00:00
Fixing Hubs output
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "plex-api-oauth",
|
"name": "plex-api-oauth",
|
||||||
"version": "1.1.114",
|
"version": "1.1.116",
|
||||||
"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": "./src/index.js",
|
"main": "./src/index.js",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
|||||||
@@ -968,7 +968,7 @@ export async function GetMusicHub(
|
|||||||
|
|
||||||
for (const hub of response.data.MediaContainer.Hub) {
|
for (const hub of response.data.MediaContainer.Hub) {
|
||||||
let hubMetaData = [];
|
let hubMetaData = [];
|
||||||
if (hub.size > 1) {
|
if (hub.size > 1 && hub.type !== "station") {
|
||||||
for (const metaDataEntry of hub.Metadata) {
|
for (const metaDataEntry of hub.Metadata) {
|
||||||
let metaEntry = {
|
let metaEntry = {
|
||||||
Genre: metaDataEntry.Genre,
|
Genre: metaDataEntry.Genre,
|
||||||
@@ -1039,11 +1039,9 @@ export async function GetMusicHub(
|
|||||||
viewCount: metaDataEntry.viewCount,
|
viewCount: metaDataEntry.viewCount,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
if (metaDataEntry.type !== "station") {
|
|
||||||
hubMetaData.push(metaEntry);
|
hubMetaData.push(metaEntry);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
hubs.push({
|
hubs.push({
|
||||||
Metadata: hubMetaData,
|
Metadata: hubMetaData,
|
||||||
context: hub.context,
|
context: hub.context,
|
||||||
@@ -1060,5 +1058,6 @@ export async function GetMusicHub(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return hubs;
|
return hubs;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user