Feat/add podcast support - #1
Draft
SteindelSE wants to merge 2 commits into
Draft
Conversation
Adds the vendored PodcastChannel/PodcastEpisodeRef/PodcastChannel types in src/podcast-sdk.ts (temporary, until @nuclearplayer/plugin-sdk ships them) plus three mappers: mapUserToPodcastChannelRef, mapTrackToPodcastEpisodeRef, and mapUserToPodcastChannel. All reuse the existing SoundcloudUser/SoundcloudTrack shapes — no new HTTP calls needed, since SoundCloud podcasters already register as users with kind === 'podcast' (or 'group').
Implements searchPodcastChannels (filters search/users to kind === 'podcast' or 'group'), searchPodcastHandles (strips leading '@' and matches on permalink), searchPodcastTitles (filters search/tracks by podcast user), and fetchPodcastChannelDetails (getUser + getUserTracks sorted latest-to-oldest). The provider literal carries the new podcastChannelMetadataCapabilities and the three podcast search categories. The single 'as MetadataProvider' cast is unavoidable until @nuclearplayer/plugin-sdk publishes a release that exports these fields natively — the shim and that cast are the two follow-up items when the SDK release lands.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds podcast support to the SoundCloud plugin for Nuclear's new Podcasts tab.
Implements the four new
MetadataProvidermethods (searchPodcastChannels,searchPodcastHandles,searchPodcastTitles,fetchPodcastChannelDetails) and declares the new search/metadata capabilities.SoundCloud podcasters already register as users with
kind === 'podcast'(or'group'), so this implementation reuses the existingsearch/users,search/tracks,users/:id, andusers/:id/tracksendpoints with client-side filtering — no new HTTP calls.Temporary shim
This PR vendors the new SDK types (
PodcastChannel,PodcastChannelRef,PodcastEpisodeRef,PodcastChannelMetadataCapability) insrc/podcast-sdk.tsbecause the host's podcast support is onnukeop/nuclear#feat/add-podcast-supportbut the corresponding@nuclearplayer/plugin-sdkrelease is not yet on npm. Once a release that exports these types is published, the shim file can be deleted in a follow-up PR.Source for the vendored types:
nukeop/nuclear@feat/add-podcast-supportpackages/model/src/podcast.tspackages/plugin-sdk/src/types/{search,metadata}.tsOnce
nukeop/nuclear#feat/add-podcast-supportlands and the resulting@nuclearplayer/plugin-sdkrelease is published to npm:src/podcast-sdk.tssrc/metadata-provider.tsto drop theas MetadataProvidercast on the returned provider@nuclearplayer/plugin-sdkinpackage.jsonto the new releasePodcastChannel*from@nuclearplayer/plugin-sdk