diff --git a/package.json b/package.json index 82795bf..55eabca 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/PlexAPIOAuth/PlexAPIOAuth.js b/src/PlexAPIOAuth/PlexAPIOAuth.js index 16c042c..a6434e1 100644 --- a/src/PlexAPIOAuth/PlexAPIOAuth.js +++ b/src/PlexAPIOAuth/PlexAPIOAuth.js @@ -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, - }); } } }