Minimal subsonic functionality
This commit is contained in:
@@ -326,14 +326,8 @@ pub async fn add_track_to_playlist(
|
||||
post_json(&format!("{BASE}/playlists/{playlist_id}/tracks"), &body).await
|
||||
}
|
||||
|
||||
pub async fn remove_track_from_playlist(
|
||||
playlist_id: i32,
|
||||
track_id: i32,
|
||||
) -> Result<(), ApiError> {
|
||||
delete(&format!(
|
||||
"{BASE}/playlists/{playlist_id}/tracks/{track_id}"
|
||||
))
|
||||
.await
|
||||
pub async fn remove_track_from_playlist(playlist_id: i32, track_id: i32) -> Result<(), ApiError> {
|
||||
delete(&format!("{BASE}/playlists/{playlist_id}/tracks/{track_id}")).await
|
||||
}
|
||||
|
||||
pub async fn reorder_playlist_tracks(
|
||||
@@ -348,6 +342,17 @@ pub async fn search_tracks(query: &str) -> Result<Vec<Track>, ApiError> {
|
||||
get_json(&format!("{BASE}/tracks?q={query}&limit=50")).await
|
||||
}
|
||||
|
||||
// --- Subsonic ---
|
||||
|
||||
pub async fn get_subsonic_password_status() -> Result<SubsonicPasswordStatus, ApiError> {
|
||||
get_json(&format!("{BASE}/auth/subsonic-password-status")).await
|
||||
}
|
||||
|
||||
pub async fn set_subsonic_password(password: &str) -> Result<serde_json::Value, ApiError> {
|
||||
let body = serde_json::json!({"password": password}).to_string();
|
||||
put_json(&format!("{BASE}/auth/subsonic-password"), &body).await
|
||||
}
|
||||
|
||||
// --- YouTube Auth ---
|
||||
|
||||
pub async fn get_ytauth_status() -> Result<YtAuthStatus, ApiError> {
|
||||
|
||||
Reference in New Issue
Block a user