Currently, media sources have three API methods:
search and get are quite clear and good now, but import is basically a wildcard and requires custom client support. This issue is intended to scope out the features that would be required in a more restrictive API.
Feature Checklist
interface MediaSource {
api?: number;
name: string;
get(context: SourceContext, sourceIDs: string[]): Promise<MediaItem[]>;
search(context: SourceContext, query: string, pagination?: any): Promise<MediaItem[]>;
// Get media items in a playlist. sourceID may be ID or a playlist URL or etc
getPlaylistItems(context: SourceContext, sourceID: string): Promise<MediaItem[]>;
// Get playlists owned by the user [throw error if user has no connected account]
getSelfPlaylists(context: SourceContext): Promise<PlaylistMeta[]>;
// Get (public) playlists owned by some other user or similar concept.
getUserPlaylists(context: SourceContext, userID: string): Promise<PlaylistMeta[]>;
// maybe?
searchPlaylists(context: SourceContext, query: string): Promise<PlaylistMeta[]>;
}
Currently, media sources have three API methods:
searchgetimportsearchandgetare quite clear and good now, butimportis basically a wildcard and requires custom client support. This issue is intended to scope out the features that would be required in a more restrictive API.Feature Checklist
Probably just assign each a name. It could be implicit on the implementer end, so Core would determine it based on which methods are available.
Like the current YouTube source, on the web client this should open a panel that lists all the media in a playlist, and that has an "import all" button that can be used to import the entire thing into a new üWave playlist.