Skip to content

Commit

Permalink
remove duplicate plexnames
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Twydell <[email protected]>
  • Loading branch information
AndrewTwydell committed Feb 6, 2025
1 parent f930e66 commit edfad75
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions packages/vsce/src/utils/profileManagement.ts
Original file line number Diff line number Diff line change
Expand Up @@ -216,13 +216,19 @@ export class ProfileManagement {
try {
const { response } = await getCache(session, { cacheToken: isPlex, nodiscard: false });
if (response.records.cicscicsplex) {

const plexes = new Set<string>();
for (const plex of toArray(response.records.cicscicsplex)) {
plexes.add(plex.plexname);
}

[...plexes].forEach((plexname) => {
infoLoaded.push({
plexname: plex.plexname,
plexname,
regions: [],
group: false,
});
}
});
}
} catch (error) {
window.showErrorMessage(
Expand Down

0 comments on commit edfad75

Please sign in to comment.