xeals / sunk Goto Github PK
View Code? Open in Web Editor NEWRust bindings for the Subsonic API
Home Page: https://docs.rs/sunk
License: Apache License 2.0
Rust bindings for the Subsonic API
Home Page: https://docs.rs/sunk
License: Apache License 2.0
I'm trying to connect to Navidrome which is available at /navidrome
The build_url() function appears to only use the host which results in it trying to send requests to /rest and not /navidrome/rest
The documentation for what a podcast and and episode can do is very poorly documented.
I would need access to a server that contains podcasts to be able to test the extent of the API.
A podcast episode is structured similarly to a song, so that suggests it might impl Streamable
.
Putting a tracking issue here to remind myself and give a notice that my time is getting shorter so this might be a bit longer coming.
In client.rs, a custom port is ignored when building the url. If you need me to make a PR to fix this, let me know and I will be more than happy.
In collections/mod.rs, the _MusicFolder internal class expects the id to be passed as a string but it's an integer
called `Result::unwrap()` on an `Err` value: Serde(Error("invalid type: integer `0`, expected a string", line: 0, column: 0))
Hi I was trying to run the example in the README with my home supysonic server however when it gets to the the .ping() section it panics.
I think the issue is that supysonic is expecting the url to be /rest/{endpoint}.view
in this case /rest/ping.view
but what it recieves is /rest/ping
Replacing the auth section with just legacy auth fixes it. I'm not sure why it doesnt work with the new system.
The code im trying to run:
let username = "user";
let password = "pass";
let site = "https://music.music.music";
let client = sunk::Client::new(site, username, password)
.unwrap();
client.ping().expect("funk2");
// Fetch some songs and play them.
let random = sunk::song::Song::random(&client, 20).unwrap();
for song in random {
println!("{:?}", song.album);
}
Navidrome uses hex strings for IDs and sunk is trying to convert them to u64s. From: https://www.navidrome.org/docs/developers/subsonic-api/
IDs in Navidrome are always strings, normally MD5 hashes or UUIDs. This is important to mention because, even though the Subsonic API schema specifies IDs as strings, some clients insist in converting IDs to integers
Here's an example album from my library:
_Album { id: "5649bff75a7b36d4789946f420712afa", name: "Freelance Bubblehead", artist: Some("1000 Clowns"), artist_id: Some("0e9ab60a6f701b3a727ef8d774bd00e1"), cover_art: Some("al-5649bff75a7b36d4789946f420712afa_63ebedbf"), song_count: 1, duration: 315, created: "2023-02-14T07:30:55.062040227Z", year: Some(1999), genre: None, song: [] }
I'll fork and try to make a version that uses Strings for IDs and report back.
Thanks so much for this library, looks like it will save me a lot of work!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.