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,24 +1039,23 @@ export async function GetMusicHub(
|
||||
viewCount: metaDataEntry.viewCount,
|
||||
};
|
||||
}
|
||||
if (metaDataEntry.type !== "station") {
|
||||
hubMetaData.push(metaEntry);
|
||||
}
|
||||
|
||||
hubMetaData.push(metaEntry);
|
||||
}
|
||||
hubs.push({
|
||||
Metadata: hubMetaData,
|
||||
context: hub.context,
|
||||
hubIdentifier: hub.hubIdentifier,
|
||||
hubKey: hub.hubKey,
|
||||
key: hub.key,
|
||||
more: hub.more,
|
||||
promoted: hub.promoted || null,
|
||||
size: hub.size,
|
||||
style: hub.style,
|
||||
title: hub.title,
|
||||
type: hub.type,
|
||||
});
|
||||
}
|
||||
hubs.push({
|
||||
Metadata: hubMetaData,
|
||||
context: hub.context,
|
||||
hubIdentifier: hub.hubIdentifier,
|
||||
hubKey: hub.hubKey,
|
||||
key: hub.key,
|
||||
more: hub.more,
|
||||
promoted: hub.promoted || null,
|
||||
size: hub.size,
|
||||
style: hub.style,
|
||||
title: hub.title,
|
||||
type: hub.type,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user