feat: add playlist tags endpoint and DiscoverPlaylistsBrowseView component
This commit is contained in:
1 parent
d912bd1284
commit
0f8bba5f89
7 files changed
+861
-2
No files matched your search
@@ -2,7 +2,7 @@
|
||||
|
||||
use tauri::State;
|
||||
|
||||
use crate::api::{endpoints, endpoints::paths, Album, Artist, ArtistAlbums, DiscoverAlbum, DiscoverData, DiscoverResponse, DiscoverPlaylistsResponse, LabelDetail, PageArtistResponse, Playlist, ReleasesGridResponse, SearchResultsPage, Track, TracksContainer};
|
||||
use crate::api::{endpoints, endpoints::paths, Album, Artist, ArtistAlbums, DiscoverAlbum, DiscoverData, DiscoverResponse, DiscoverPlaylistsResponse, LabelDetail, PageArtistResponse, Playlist, PlaylistTag, ReleasesGridResponse, SearchResultsPage, Track, TracksContainer};
|
||||
use crate::api_cache::ApiCacheState;
|
||||
use crate::artist_blacklist::BlacklistState;
|
||||
use crate::AppState;
|
||||
@@ -694,6 +694,18 @@ pub async fn get_discover_playlists(
|
||||
.map_err(|e| e.to_string())
|
||||
}
|
||||
|
||||
/// Get playlist tags (localized names from /playlist/getTags)
|
||||
#[tauri::command]
|
||||
pub async fn get_playlist_tags(
|
||||
state: State<'_, AppState>,
|
||||
) -> Result<Vec<PlaylistTag>, String> {
|
||||
let client = state.client.read().await;
|
||||
client
|
||||
.get_playlist_tags()
|
||||
.await
|
||||
.map_err(|e| e.to_string())
|
||||
}
|
||||
|
||||
/// Get discover albums from a browse endpoint (newReleases, idealDiscography, mostStreamed)
|
||||
#[tauri::command]
|
||||
pub async fn get_discover_albums(
|
||||
|
||||
Reference in new issue
Block a user