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",
|
||||
"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",
|
||||
"main": "./src/index.js",
|
||||
"type": "module",
|
||||
|
||||
@@ -968,7 +968,7 @@ export async function GetMusicHub(
|
||||
|
||||
for (const hub of response.data.MediaContainer.Hub) {
|
||||
let hubMetaData = [];
|
||||
if (hub.size > 1) {
|
||||
if (hub.size > 1 && hub.type !== "station") {
|
||||
for (const metaDataEntry of hub.Metadata) {
|
||||
let metaEntry = {
|
||||
Genre: metaDataEntry.Genre,
|
||||
@@ -1039,11 +1039,9 @@ export async function GetMusicHub(
|
||||
viewCount: metaDataEntry.viewCount,
|
||||
};
|
||||
}
|
||||
if (metaDataEntry.type !== "station") {
|
||||
|
||||
hubMetaData.push(metaEntry);
|
||||
}
|
||||
}
|
||||
}
|
||||
hubs.push({
|
||||
Metadata: hubMetaData,
|
||||
context: hub.context,
|
||||
@@ -1060,5 +1058,6 @@ export async function GetMusicHub(
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return hubs;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user