This commit is contained in:
2023-08-13 21:48:41 +01:00
commit 0024150376
14 changed files with 1875 additions and 0 deletions

1042
navidrome/Cargo.lock generated Normal file

File diff suppressed because it is too large Load Diff

8
navidrome/Cargo.toml Normal file
View File

@ -0,0 +1,8 @@
[package]
name = "navidrome"
version = "0.1.0"
edition = "2021"
[dependencies]
reqwest = "0.11.18"
serde = { version = "1.0.183", features = ["derive"] }

View File

View File

@ -0,0 +1,13 @@
pub struct Client {
base: String,
http: reqwest::Client,
}
impl Client {
fn playlists() {
const
}
}

2
navidrome/src/lib.rs Normal file
View File

@ -0,0 +1,2 @@
pub mod models;
pub mod client;

15
navidrome/src/models.rs Normal file
View File

@ -0,0 +1,15 @@
use serde::Deserialize;
#[derive(Deserialize)]
struct LoginResponse {
id: String, // todo should be a uuid
#[serde(rename = "isAdmin")]
is_admin: bool,
name: String,
#[serde(rename = "subsonicSalt")]
subsonic_salt: String,
#[serde(rename = "subsonicToken")]
subsonic_token: String,
token: String,
username: String,
}