pub struct MusicPlayerClient<Stub = Channel<MusicPlayerRequest, MusicPlayerResponse>>(/* private fields */);Expand description
The client stub that makes RPC calls to the server. All request methods return Futures.
Implementations§
Source§impl MusicPlayerClient
impl MusicPlayerClient
Sourcepub fn new<T>(
config: Config,
transport: T,
) -> NewClient<Self, RequestDispatch<MusicPlayerRequest, MusicPlayerResponse, T>>
pub fn new<T>( config: Config, transport: T, ) -> NewClient<Self, RequestDispatch<MusicPlayerRequest, MusicPlayerResponse, T>>
Returns a new client stub that sends requests over the given transport.
Source§impl<Stub> MusicPlayerClient<Stub>
impl<Stub> MusicPlayerClient<Stub>
Sourcepub fn register_listener(
&self,
ctx: Context,
listener_addr: SocketAddr,
) -> impl Future<Output = Result<(), RpcError>> + '_
pub fn register_listener( &self, ctx: Context, listener_addr: SocketAddr, ) -> impl Future<Output = Result<(), RpcError>> + '_
Register a UDP listener with the daemon.
pub fn ping( &self, ctx: Context, ) -> impl Future<Output = Result<String, RpcError>> + '_
Sourcepub fn library_rescan(
&self,
ctx: Context,
) -> impl Future<Output = Result<Result<(), SerializableLibraryError>, RpcError>> + '_
pub fn library_rescan( &self, ctx: Context, ) -> impl Future<Output = Result<Result<(), SerializableLibraryError>, RpcError>> + '_
Rescans the music library, only error is if a rescan is already in progress.
Sourcepub fn library_rescan_in_progress(
&self,
ctx: Context,
) -> impl Future<Output = Result<bool, RpcError>> + '_
pub fn library_rescan_in_progress( &self, ctx: Context, ) -> impl Future<Output = Result<bool, RpcError>> + '_
Check if a rescan is in progress.
Sourcepub fn library_analyze(
&self,
ctx: Context,
overwrite: bool,
) -> impl Future<Output = Result<Result<(), SerializableLibraryError>, RpcError>> + '_
pub fn library_analyze( &self, ctx: Context, overwrite: bool, ) -> impl Future<Output = Result<Result<(), SerializableLibraryError>, RpcError>> + '_
Analyze the music library, only error is if an analysis is already in progress.
Sourcepub fn library_analyze_in_progress(
&self,
ctx: Context,
) -> impl Future<Output = Result<bool, RpcError>> + '_
pub fn library_analyze_in_progress( &self, ctx: Context, ) -> impl Future<Output = Result<bool, RpcError>> + '_
Check if an analysis is in progress.
Sourcepub fn library_recluster(
&self,
ctx: Context,
) -> impl Future<Output = Result<Result<(), SerializableLibraryError>, RpcError>> + '_
pub fn library_recluster( &self, ctx: Context, ) -> impl Future<Output = Result<Result<(), SerializableLibraryError>, RpcError>> + '_
Recluster the music library, only error is if a recluster is already in progress.
Sourcepub fn library_recluster_in_progress(
&self,
ctx: Context,
) -> impl Future<Output = Result<bool, RpcError>> + '_
pub fn library_recluster_in_progress( &self, ctx: Context, ) -> impl Future<Output = Result<bool, RpcError>> + '_
Check if a recluster is in progress.
Sourcepub fn library_brief(
&self,
ctx: Context,
) -> impl Future<Output = Result<Result<LibraryBrief, SerializableLibraryError>, RpcError>> + '_
pub fn library_brief( &self, ctx: Context, ) -> impl Future<Output = Result<Result<LibraryBrief, SerializableLibraryError>, RpcError>> + '_
Returns brief information about the music library.
Sourcepub fn library_full(
&self,
ctx: Context,
) -> impl Future<Output = Result<Result<LibraryFull, SerializableLibraryError>, RpcError>> + '_
pub fn library_full( &self, ctx: Context, ) -> impl Future<Output = Result<Result<LibraryFull, SerializableLibraryError>, RpcError>> + '_
Returns full information about the music library. (all songs, artists, albums, etc.)
Sourcepub fn library_artists_brief(
&self,
ctx: Context,
) -> impl Future<Output = Result<Result<Box<[ArtistBrief]>, SerializableLibraryError>, RpcError>> + '_
pub fn library_artists_brief( &self, ctx: Context, ) -> impl Future<Output = Result<Result<Box<[ArtistBrief]>, SerializableLibraryError>, RpcError>> + '_
Returns brief information about the music library’s artists.
Sourcepub fn library_artists_full(
&self,
ctx: Context,
) -> impl Future<Output = Result<Result<Box<[Artist]>, SerializableLibraryError>, RpcError>> + '_
pub fn library_artists_full( &self, ctx: Context, ) -> impl Future<Output = Result<Result<Box<[Artist]>, SerializableLibraryError>, RpcError>> + '_
Returns full information about the music library’s artists.
Sourcepub fn library_albums_brief(
&self,
ctx: Context,
) -> impl Future<Output = Result<Result<Box<[AlbumBrief]>, SerializableLibraryError>, RpcError>> + '_
pub fn library_albums_brief( &self, ctx: Context, ) -> impl Future<Output = Result<Result<Box<[AlbumBrief]>, SerializableLibraryError>, RpcError>> + '_
Returns brief information about the music library’s albums.
Sourcepub fn library_albums_full(
&self,
ctx: Context,
) -> impl Future<Output = Result<Result<Box<[Album]>, SerializableLibraryError>, RpcError>> + '_
pub fn library_albums_full( &self, ctx: Context, ) -> impl Future<Output = Result<Result<Box<[Album]>, SerializableLibraryError>, RpcError>> + '_
Returns full information about the music library’s albums.
Sourcepub fn library_songs_brief(
&self,
ctx: Context,
) -> impl Future<Output = Result<Result<Box<[SongBrief]>, SerializableLibraryError>, RpcError>> + '_
pub fn library_songs_brief( &self, ctx: Context, ) -> impl Future<Output = Result<Result<Box<[SongBrief]>, SerializableLibraryError>, RpcError>> + '_
Returns brief information about the music library’s songs.
Sourcepub fn library_songs_full(
&self,
ctx: Context,
) -> impl Future<Output = Result<Result<Box<[Song]>, SerializableLibraryError>, RpcError>> + '_
pub fn library_songs_full( &self, ctx: Context, ) -> impl Future<Output = Result<Result<Box<[Song]>, SerializableLibraryError>, RpcError>> + '_
Returns full information about the music library’s songs.
Sourcepub fn library_health(
&self,
ctx: Context,
) -> impl Future<Output = Result<Result<LibraryHealth, SerializableLibraryError>, RpcError>> + '_
pub fn library_health( &self, ctx: Context, ) -> impl Future<Output = Result<Result<LibraryHealth, SerializableLibraryError>, RpcError>> + '_
Returns information about the health of the music library (are there any missing files, etc.)
Sourcepub fn library_song_get(
&self,
ctx: Context,
id: SongId,
) -> impl Future<Output = Result<Option<Song>, RpcError>> + '_
pub fn library_song_get( &self, ctx: Context, id: SongId, ) -> impl Future<Output = Result<Option<Song>, RpcError>> + '_
Get a song by its ID.
Sourcepub fn library_song_get_by_path(
&self,
ctx: Context,
path: PathBuf,
) -> impl Future<Output = Result<Option<Song>, RpcError>> + '_
pub fn library_song_get_by_path( &self, ctx: Context, path: PathBuf, ) -> impl Future<Output = Result<Option<Song>, RpcError>> + '_
Get a song by its path.
Sourcepub fn library_song_get_artist(
&self,
ctx: Context,
id: SongId,
) -> impl Future<Output = Result<OneOrMany<Artist>, RpcError>> + '_
pub fn library_song_get_artist( &self, ctx: Context, id: SongId, ) -> impl Future<Output = Result<OneOrMany<Artist>, RpcError>> + '_
Get the artists of a song.
Sourcepub fn library_song_get_album(
&self,
ctx: Context,
id: SongId,
) -> impl Future<Output = Result<Option<Album>, RpcError>> + '_
pub fn library_song_get_album( &self, ctx: Context, id: SongId, ) -> impl Future<Output = Result<Option<Album>, RpcError>> + '_
Get the album of a song.
Sourcepub fn library_song_get_playlists(
&self,
ctx: Context,
id: SongId,
) -> impl Future<Output = Result<Box<[Playlist]>, RpcError>> + '_
pub fn library_song_get_playlists( &self, ctx: Context, id: SongId, ) -> impl Future<Output = Result<Box<[Playlist]>, RpcError>> + '_
Get the Playlists a song is in.
Sourcepub fn library_song_get_collections(
&self,
ctx: Context,
id: SongId,
) -> impl Future<Output = Result<Box<[Collection]>, RpcError>> + '_
pub fn library_song_get_collections( &self, ctx: Context, id: SongId, ) -> impl Future<Output = Result<Box<[Collection]>, RpcError>> + '_
Get the Collections a song is in.
Sourcepub fn library_album_get(
&self,
ctx: Context,
id: AlbumId,
) -> impl Future<Output = Result<Option<Album>, RpcError>> + '_
pub fn library_album_get( &self, ctx: Context, id: AlbumId, ) -> impl Future<Output = Result<Option<Album>, RpcError>> + '_
Get an album by its ID.
Sourcepub fn library_album_get_artist(
&self,
ctx: Context,
id: AlbumId,
) -> impl Future<Output = Result<OneOrMany<Artist>, RpcError>> + '_
pub fn library_album_get_artist( &self, ctx: Context, id: AlbumId, ) -> impl Future<Output = Result<OneOrMany<Artist>, RpcError>> + '_
Get the artists of an album
Sourcepub fn library_album_get_songs(
&self,
ctx: Context,
id: AlbumId,
) -> impl Future<Output = Result<Option<Box<[Song]>>, RpcError>> + '_
pub fn library_album_get_songs( &self, ctx: Context, id: AlbumId, ) -> impl Future<Output = Result<Option<Box<[Song]>>, RpcError>> + '_
Get the songs of an album
Sourcepub fn library_artist_get(
&self,
ctx: Context,
id: ArtistId,
) -> impl Future<Output = Result<Option<Artist>, RpcError>> + '_
pub fn library_artist_get( &self, ctx: Context, id: ArtistId, ) -> impl Future<Output = Result<Option<Artist>, RpcError>> + '_
Get an artist by its ID.
Sourcepub fn library_artist_get_songs(
&self,
ctx: Context,
id: ArtistId,
) -> impl Future<Output = Result<Option<Box<[Song]>>, RpcError>> + '_
pub fn library_artist_get_songs( &self, ctx: Context, id: ArtistId, ) -> impl Future<Output = Result<Option<Box<[Song]>>, RpcError>> + '_
Get the songs of an artist
Sourcepub fn library_artist_get_albums(
&self,
ctx: Context,
id: ArtistId,
) -> impl Future<Output = Result<Option<Box<[Album]>>, RpcError>> + '_
pub fn library_artist_get_albums( &self, ctx: Context, id: ArtistId, ) -> impl Future<Output = Result<Option<Box<[Album]>>, RpcError>> + '_
Get the albums of an artist
Sourcepub fn daemon_shutdown(
&self,
ctx: Context,
) -> impl Future<Output = Result<(), RpcError>> + '_
pub fn daemon_shutdown( &self, ctx: Context, ) -> impl Future<Output = Result<(), RpcError>> + '_
tells the daemon to shutdown.
Sourcepub fn state_audio(
&self,
ctx: Context,
) -> impl Future<Output = Result<Option<StateAudio>, RpcError>> + '_
pub fn state_audio( &self, ctx: Context, ) -> impl Future<Output = Result<Option<StateAudio>, RpcError>> + '_
returns full information about the current state of the audio player (queue, current song, etc.)
Sourcepub fn current_artist(
&self,
ctx: Context,
) -> impl Future<Output = Result<OneOrMany<Artist>, RpcError>> + '_
pub fn current_artist( &self, ctx: Context, ) -> impl Future<Output = Result<OneOrMany<Artist>, RpcError>> + '_
returns the current artist.
Sourcepub fn current_album(
&self,
ctx: Context,
) -> impl Future<Output = Result<Option<Album>, RpcError>> + '_
pub fn current_album( &self, ctx: Context, ) -> impl Future<Output = Result<Option<Album>, RpcError>> + '_
returns the current album.
Sourcepub fn current_song(
&self,
ctx: Context,
) -> impl Future<Output = Result<Option<Song>, RpcError>> + '_
pub fn current_song( &self, ctx: Context, ) -> impl Future<Output = Result<Option<Song>, RpcError>> + '_
returns the current song.
Sourcepub fn rand_artist(
&self,
ctx: Context,
) -> impl Future<Output = Result<Option<Artist>, RpcError>> + '_
pub fn rand_artist( &self, ctx: Context, ) -> impl Future<Output = Result<Option<Artist>, RpcError>> + '_
returns a random artist.
Sourcepub fn rand_album(
&self,
ctx: Context,
) -> impl Future<Output = Result<Option<Album>, RpcError>> + '_
pub fn rand_album( &self, ctx: Context, ) -> impl Future<Output = Result<Option<Album>, RpcError>> + '_
returns a random album.
Sourcepub fn rand_song(
&self,
ctx: Context,
) -> impl Future<Output = Result<Option<Song>, RpcError>> + '_
pub fn rand_song( &self, ctx: Context, ) -> impl Future<Output = Result<Option<Song>, RpcError>> + '_
returns a random song.
Sourcepub fn search(
&self,
ctx: Context,
query: String,
limit: u32,
) -> impl Future<Output = Result<SearchResult, RpcError>> + '_
pub fn search( &self, ctx: Context, query: String, limit: u32, ) -> impl Future<Output = Result<SearchResult, RpcError>> + '_
returns a list of artists, albums, and songs matching the given search query.
Sourcepub fn search_artist(
&self,
ctx: Context,
query: String,
limit: u32,
) -> impl Future<Output = Result<Box<[Artist]>, RpcError>> + '_
pub fn search_artist( &self, ctx: Context, query: String, limit: u32, ) -> impl Future<Output = Result<Box<[Artist]>, RpcError>> + '_
returns a list of artists matching the given search query.
Sourcepub fn search_album(
&self,
ctx: Context,
query: String,
limit: u32,
) -> impl Future<Output = Result<Box<[Album]>, RpcError>> + '_
pub fn search_album( &self, ctx: Context, query: String, limit: u32, ) -> impl Future<Output = Result<Box<[Album]>, RpcError>> + '_
returns a list of albums matching the given search query.
Sourcepub fn search_song(
&self,
ctx: Context,
query: String,
limit: u32,
) -> impl Future<Output = Result<Box<[Song]>, RpcError>> + '_
pub fn search_song( &self, ctx: Context, query: String, limit: u32, ) -> impl Future<Output = Result<Box<[Song]>, RpcError>> + '_
returns a list of songs matching the given search query.
Sourcepub fn playback_toggle(
&self,
ctx: Context,
) -> impl Future<Output = Result<(), RpcError>> + '_
pub fn playback_toggle( &self, ctx: Context, ) -> impl Future<Output = Result<(), RpcError>> + '_
toggles playback (play/pause).
Sourcepub fn playback_play(
&self,
ctx: Context,
) -> impl Future<Output = Result<(), RpcError>> + '_
pub fn playback_play( &self, ctx: Context, ) -> impl Future<Output = Result<(), RpcError>> + '_
start playback (unpause).
Sourcepub fn playback_pause(
&self,
ctx: Context,
) -> impl Future<Output = Result<(), RpcError>> + '_
pub fn playback_pause( &self, ctx: Context, ) -> impl Future<Output = Result<(), RpcError>> + '_
pause playback.
Sourcepub fn playback_stop(
&self,
ctx: Context,
) -> impl Future<Output = Result<(), RpcError>> + '_
pub fn playback_stop( &self, ctx: Context, ) -> impl Future<Output = Result<(), RpcError>> + '_
stop playback.
Sourcepub fn playback_restart(
&self,
ctx: Context,
) -> impl Future<Output = Result<(), RpcError>> + '_
pub fn playback_restart( &self, ctx: Context, ) -> impl Future<Output = Result<(), RpcError>> + '_
restart the current song.
Sourcepub fn playback_skip_forward(
&self,
ctx: Context,
amount: usize,
) -> impl Future<Output = Result<(), RpcError>> + '_
pub fn playback_skip_forward( &self, ctx: Context, amount: usize, ) -> impl Future<Output = Result<(), RpcError>> + '_
skip forward by the given amount of songs
Sourcepub fn playback_skip_backward(
&self,
ctx: Context,
amount: usize,
) -> impl Future<Output = Result<(), RpcError>> + '_
pub fn playback_skip_backward( &self, ctx: Context, amount: usize, ) -> impl Future<Output = Result<(), RpcError>> + '_
go backwards by the given amount of songs.
Sourcepub fn playback_clear_player(
&self,
ctx: Context,
) -> impl Future<Output = Result<(), RpcError>> + '_
pub fn playback_clear_player( &self, ctx: Context, ) -> impl Future<Output = Result<(), RpcError>> + '_
only clear the player (i.e. stop playback)
Sourcepub fn playback_clear(
&self,
ctx: Context,
) -> impl Future<Output = Result<(), RpcError>> + '_
pub fn playback_clear( &self, ctx: Context, ) -> impl Future<Output = Result<(), RpcError>> + '_
clears the queue and stops playback.
Sourcepub fn playback_seek(
&self,
ctx: Context,
seek: SeekType,
duration: Duration,
) -> impl Future<Output = Result<(), RpcError>> + '_
pub fn playback_seek( &self, ctx: Context, seek: SeekType, duration: Duration, ) -> impl Future<Output = Result<(), RpcError>> + '_
seek forwards, backwards, or to an absolute second in the current song.
Sourcepub fn playback_repeat(
&self,
ctx: Context,
mode: RepeatMode,
) -> impl Future<Output = Result<(), RpcError>> + '_
pub fn playback_repeat( &self, ctx: Context, mode: RepeatMode, ) -> impl Future<Output = Result<(), RpcError>> + '_
set the repeat mode.
Sourcepub fn playback_shuffle(
&self,
ctx: Context,
) -> impl Future<Output = Result<(), RpcError>> + '_
pub fn playback_shuffle( &self, ctx: Context, ) -> impl Future<Output = Result<(), RpcError>> + '_
Shuffle the current queue, then start playing from the 1st Song in the queue.
Sourcepub fn playback_volume(
&self,
ctx: Context,
volume: f32,
) -> impl Future<Output = Result<(), RpcError>> + '_
pub fn playback_volume( &self, ctx: Context, volume: f32, ) -> impl Future<Output = Result<(), RpcError>> + '_
set the volume to the given value
The value 1.0 is the “normal” volume (unfiltered input). Any value other than 1.0 will multiply each sample by this value.
Sourcepub fn playback_volume_up(
&self,
ctx: Context,
amount: f32,
) -> impl Future<Output = Result<(), RpcError>> + '_
pub fn playback_volume_up( &self, ctx: Context, amount: f32, ) -> impl Future<Output = Result<(), RpcError>> + '_
increase the volume by the given amount
Sourcepub fn playback_volume_down(
&self,
ctx: Context,
amount: f32,
) -> impl Future<Output = Result<(), RpcError>> + '_
pub fn playback_volume_down( &self, ctx: Context, amount: f32, ) -> impl Future<Output = Result<(), RpcError>> + '_
decrease the volume by the given amount
Sourcepub fn playback_volume_toggle_mute(
&self,
ctx: Context,
) -> impl Future<Output = Result<(), RpcError>> + '_
pub fn playback_volume_toggle_mute( &self, ctx: Context, ) -> impl Future<Output = Result<(), RpcError>> + '_
toggle the volume mute.
Sourcepub fn playback_mute(
&self,
ctx: Context,
) -> impl Future<Output = Result<(), RpcError>> + '_
pub fn playback_mute( &self, ctx: Context, ) -> impl Future<Output = Result<(), RpcError>> + '_
mute the volume.
Sourcepub fn playback_unmute(
&self,
ctx: Context,
) -> impl Future<Output = Result<(), RpcError>> + '_
pub fn playback_unmute( &self, ctx: Context, ) -> impl Future<Output = Result<(), RpcError>> + '_
unmute the volume.
Sourcepub fn queue_add(
&self,
ctx: Context,
thing: RecordId,
) -> impl Future<Output = Result<Result<(), SerializableLibraryError>, RpcError>> + '_
pub fn queue_add( &self, ctx: Context, thing: RecordId, ) -> impl Future<Output = Result<Result<(), SerializableLibraryError>, RpcError>> + '_
add a thing to the queue. (if the queue is empty, it will start playing the song.)
Sourcepub fn queue_add_list(
&self,
ctx: Context,
list: Vec<RecordId>,
) -> impl Future<Output = Result<Result<(), SerializableLibraryError>, RpcError>> + '_
pub fn queue_add_list( &self, ctx: Context, list: Vec<RecordId>, ) -> impl Future<Output = Result<Result<(), SerializableLibraryError>, RpcError>> + '_
add a list of things to the queue. (if the queue is empty, it will start playing the first thing in the list.)
Sourcepub fn queue_set_index(
&self,
ctx: Context,
index: usize,
) -> impl Future<Output = Result<(), RpcError>> + '_
pub fn queue_set_index( &self, ctx: Context, index: usize, ) -> impl Future<Output = Result<(), RpcError>> + '_
set the current song to a queue index. if the index is out of bounds, it will be clamped to the nearest valid index.
Sourcepub fn queue_remove_range(
&self,
ctx: Context,
range: Range<usize>,
) -> impl Future<Output = Result<(), RpcError>> + '_
pub fn queue_remove_range( &self, ctx: Context, range: Range<usize>, ) -> impl Future<Output = Result<(), RpcError>> + '_
remove a range of songs from the queue. if the range is out of bounds, it will be clamped to the nearest valid range.
Sourcepub fn playlist_list(
&self,
ctx: Context,
) -> impl Future<Output = Result<Box<[PlaylistBrief]>, RpcError>> + '_
pub fn playlist_list( &self, ctx: Context, ) -> impl Future<Output = Result<Box<[PlaylistBrief]>, RpcError>> + '_
Returns brief information about the users playlists.
Sourcepub fn playlist_get_or_create(
&self,
ctx: Context,
name: String,
) -> impl Future<Output = Result<Result<PlaylistId, SerializableLibraryError>, RpcError>> + '_
pub fn playlist_get_or_create( &self, ctx: Context, name: String, ) -> impl Future<Output = Result<Result<PlaylistId, SerializableLibraryError>, RpcError>> + '_
create a new playlist with the given name (if it does not already exist).
Sourcepub fn playlist_remove(
&self,
ctx: Context,
id: PlaylistId,
) -> impl Future<Output = Result<Result<(), SerializableLibraryError>, RpcError>> + '_
pub fn playlist_remove( &self, ctx: Context, id: PlaylistId, ) -> impl Future<Output = Result<Result<(), SerializableLibraryError>, RpcError>> + '_
remove a playlist.
Sourcepub fn playlist_clone(
&self,
ctx: Context,
id: PlaylistId,
) -> impl Future<Output = Result<Result<PlaylistId, SerializableLibraryError>, RpcError>> + '_
pub fn playlist_clone( &self, ctx: Context, id: PlaylistId, ) -> impl Future<Output = Result<Result<PlaylistId, SerializableLibraryError>, RpcError>> + '_
clone a playlist. (creates a new playlist with the same name (append “copy”) and contents as the given playlist.) returns the id of the new playlist.
Sourcepub fn playlist_get_id(
&self,
ctx: Context,
name: String,
) -> impl Future<Output = Result<Option<PlaylistId>, RpcError>> + '_
pub fn playlist_get_id( &self, ctx: Context, name: String, ) -> impl Future<Output = Result<Option<PlaylistId>, RpcError>> + '_
get the id of a playlist. returns none if the playlist does not exist.
Sourcepub fn playlist_remove_songs(
&self,
ctx: Context,
playlist: PlaylistId,
songs: Vec<SongId>,
) -> impl Future<Output = Result<Result<(), SerializableLibraryError>, RpcError>> + '_
pub fn playlist_remove_songs( &self, ctx: Context, playlist: PlaylistId, songs: Vec<SongId>, ) -> impl Future<Output = Result<Result<(), SerializableLibraryError>, RpcError>> + '_
remove a list of songs from a playlist. if the songs are not in the playlist, this will do nothing.
Sourcepub fn playlist_add(
&self,
ctx: Context,
playlist: PlaylistId,
thing: RecordId,
) -> impl Future<Output = Result<Result<(), SerializableLibraryError>, RpcError>> + '_
pub fn playlist_add( &self, ctx: Context, playlist: PlaylistId, thing: RecordId, ) -> impl Future<Output = Result<Result<(), SerializableLibraryError>, RpcError>> + '_
Add a thing to a playlist. If the thing is something that has songs (an album, artist, etc.), it will add all the songs.
Sourcepub fn playlist_add_list(
&self,
ctx: Context,
playlist: PlaylistId,
list: Vec<RecordId>,
) -> impl Future<Output = Result<Result<(), SerializableLibraryError>, RpcError>> + '_
pub fn playlist_add_list( &self, ctx: Context, playlist: PlaylistId, list: Vec<RecordId>, ) -> impl Future<Output = Result<Result<(), SerializableLibraryError>, RpcError>> + '_
Add a list of things to a playlist. If the things are something that have songs (an album, artist, etc.), it will add all the songs.
Sourcepub fn playlist_get(
&self,
ctx: Context,
id: PlaylistId,
) -> impl Future<Output = Result<Option<Playlist>, RpcError>> + '_
pub fn playlist_get( &self, ctx: Context, id: PlaylistId, ) -> impl Future<Output = Result<Option<Playlist>, RpcError>> + '_
Get a playlist by its ID.
Sourcepub fn playlist_get_songs(
&self,
ctx: Context,
id: PlaylistId,
) -> impl Future<Output = Result<Option<Box<[Song]>>, RpcError>> + '_
pub fn playlist_get_songs( &self, ctx: Context, id: PlaylistId, ) -> impl Future<Output = Result<Option<Box<[Song]>>, RpcError>> + '_
Get the songs of a playlist
Sourcepub fn playlist_rename(
&self,
ctx: Context,
id: PlaylistId,
name: String,
) -> impl Future<Output = Result<Result<Playlist, SerializableLibraryError>, RpcError>> + '_
pub fn playlist_rename( &self, ctx: Context, id: PlaylistId, name: String, ) -> impl Future<Output = Result<Result<Playlist, SerializableLibraryError>, RpcError>> + '_
Rename a playlist.
Sourcepub fn collection_list(
&self,
ctx: Context,
) -> impl Future<Output = Result<Box<[CollectionBrief]>, RpcError>> + '_
pub fn collection_list( &self, ctx: Context, ) -> impl Future<Output = Result<Box<[CollectionBrief]>, RpcError>> + '_
Collections: Return brief information about the users auto curration collections.
Sourcepub fn collection_get(
&self,
ctx: Context,
id: CollectionId,
) -> impl Future<Output = Result<Option<Collection>, RpcError>> + '_
pub fn collection_get( &self, ctx: Context, id: CollectionId, ) -> impl Future<Output = Result<Option<Collection>, RpcError>> + '_
Collections: get a collection by its ID.
Sourcepub fn collection_freeze(
&self,
ctx: Context,
id: CollectionId,
name: String,
) -> impl Future<Output = Result<Result<PlaylistId, SerializableLibraryError>, RpcError>> + '_
pub fn collection_freeze( &self, ctx: Context, id: CollectionId, name: String, ) -> impl Future<Output = Result<Result<PlaylistId, SerializableLibraryError>, RpcError>> + '_
Collections: freeze a collection (convert it to a playlist).
Sourcepub fn collection_get_songs(
&self,
ctx: Context,
id: CollectionId,
) -> impl Future<Output = Result<Option<Box<[Song]>>, RpcError>> + '_
pub fn collection_get_songs( &self, ctx: Context, id: CollectionId, ) -> impl Future<Output = Result<Option<Box<[Song]>>, RpcError>> + '_
Get the songs of a collection
Sourcepub fn radio_get_similar(
&self,
ctx: Context,
things: Vec<RecordId>,
n: u32,
) -> impl Future<Output = Result<Result<Box<[Song]>, SerializableLibraryError>, RpcError>> + '_
pub fn radio_get_similar( &self, ctx: Context, things: Vec<RecordId>, n: u32, ) -> impl Future<Output = Result<Result<Box<[Song]>, SerializableLibraryError>, RpcError>> + '_
Radio: get the n most similar songs to the given things.
Sourcepub fn radio_get_similar_ids(
&self,
ctx: Context,
things: Vec<RecordId>,
n: u32,
) -> impl Future<Output = Result<Result<Box<[SongId]>, SerializableLibraryError>, RpcError>> + '_
pub fn radio_get_similar_ids( &self, ctx: Context, things: Vec<RecordId>, n: u32, ) -> impl Future<Output = Result<Result<Box<[SongId]>, SerializableLibraryError>, RpcError>> + '_
Radio: get the ids of the n most similar songs to the given things.
Sourcepub fn dynamic_playlist_create(
&self,
ctx: Context,
name: String,
query: Query,
) -> impl Future<Output = Result<Result<DynamicPlaylistId, SerializableLibraryError>, RpcError>> + '_
pub fn dynamic_playlist_create( &self, ctx: Context, name: String, query: Query, ) -> impl Future<Output = Result<Result<DynamicPlaylistId, SerializableLibraryError>, RpcError>> + '_
Dynamic Playlists: create a new DP with the given name and query
Sourcepub fn dynamic_playlist_list(
&self,
ctx: Context,
) -> impl Future<Output = Result<Box<[DynamicPlaylist]>, RpcError>> + '_
pub fn dynamic_playlist_list( &self, ctx: Context, ) -> impl Future<Output = Result<Box<[DynamicPlaylist]>, RpcError>> + '_
Dynamic Playlists: list all DPs
Sourcepub fn dynamic_playlist_update(
&self,
ctx: Context,
id: DynamicPlaylistId,
changes: DynamicPlaylistChangeSet,
) -> impl Future<Output = Result<Result<DynamicPlaylist, SerializableLibraryError>, RpcError>> + '_
pub fn dynamic_playlist_update( &self, ctx: Context, id: DynamicPlaylistId, changes: DynamicPlaylistChangeSet, ) -> impl Future<Output = Result<Result<DynamicPlaylist, SerializableLibraryError>, RpcError>> + '_
Dynamic Playlists: update a DP
Sourcepub fn dynamic_playlist_remove(
&self,
ctx: Context,
id: DynamicPlaylistId,
) -> impl Future<Output = Result<Result<(), SerializableLibraryError>, RpcError>> + '_
pub fn dynamic_playlist_remove( &self, ctx: Context, id: DynamicPlaylistId, ) -> impl Future<Output = Result<Result<(), SerializableLibraryError>, RpcError>> + '_
Dynamic Playlists: remove a DP
Sourcepub fn dynamic_playlist_get(
&self,
ctx: Context,
id: DynamicPlaylistId,
) -> impl Future<Output = Result<Option<DynamicPlaylist>, RpcError>> + '_
pub fn dynamic_playlist_get( &self, ctx: Context, id: DynamicPlaylistId, ) -> impl Future<Output = Result<Option<DynamicPlaylist>, RpcError>> + '_
Dynamic Playlists: get a DP by its ID
Sourcepub fn dynamic_playlist_get_songs(
&self,
ctx: Context,
id: DynamicPlaylistId,
) -> impl Future<Output = Result<Option<Box<[Song]>>, RpcError>> + '_
pub fn dynamic_playlist_get_songs( &self, ctx: Context, id: DynamicPlaylistId, ) -> impl Future<Output = Result<Option<Box<[Song]>>, RpcError>> + '_
Dynamic Playlists: get the songs of a DP
Trait Implementations§
Source§impl<Stub: Clone> Clone for MusicPlayerClient<Stub>
impl<Stub: Clone> Clone for MusicPlayerClient<Stub>
Source§fn clone(&self) -> MusicPlayerClient<Stub>
fn clone(&self) -> MusicPlayerClient<Stub>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<Stub: Debug> Debug for MusicPlayerClient<Stub>
impl<Stub: Debug> Debug for MusicPlayerClient<Stub>
Source§impl<Stub> From<Stub> for MusicPlayerClient<Stub>
impl<Stub> From<Stub> for MusicPlayerClient<Stub>
Auto Trait Implementations§
impl<Stub> Freeze for MusicPlayerClient<Stub>where
Stub: Freeze,
impl<Stub> RefUnwindSafe for MusicPlayerClient<Stub>where
Stub: RefUnwindSafe,
impl<Stub> Send for MusicPlayerClient<Stub>where
Stub: Send,
impl<Stub> Sync for MusicPlayerClient<Stub>where
Stub: Sync,
impl<Stub> Unpin for MusicPlayerClient<Stub>where
Stub: Unpin,
impl<Stub> UnwindSafe for MusicPlayerClient<Stub>where
Stub: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more