mirror of
https://github.com/librespot-org/librespot.git
synced 2026-04-27 08:15:50 +03:00
[GH-ISSUE #858] Two qestions about the Rust library - metadata and cover art #431
Labels
No labels
A-Alsa
SpotifyAPI
Tokio 1.0
audio
bug
can't reproduce
compilation
dependencies
duplicate
enhancement
good first issue
help wanted
high priority
imported
imported
invalid
new api
pull-request
question
reverse engineering
wiki
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/librespot#431
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @unsuited1 on GitHub (Oct 5, 2021).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/858
I am working on a native Rust Spotify binary for GNU/Linux to get more familiar with this language.
I tried to get more metadata of Tracks / Albums than is given in librespot_metadata::Track. librespot_protocol::metadata::Track implements much more functions like
get_disc_number(), so there must somehow be a way to get this data vialibrespot. Since I am new to Rust I was not able to fetch this data yet. Can anyone please give me a hint on how to obtain more metadata about a givenlibrespot_metadata::Track/librespot_metadata::Album(I assume the workflow is similar for tracks / albums / artists)?My second issue involves fetching a cover art of an album. librespot_metadata::cover has a function
get()which returnsChannelDatawhich implementsStream/StreamExt.StreamExthas a functionnext()which should yield aResultcontaining eitherBytesor aChannelError(in this implementation) after having being awaited. For some reason I always get aChannelError, the warning log prints this:ERROR librespot_core::channel] channel error: 2 0. Looking into the source code did not help much, because I am, as I said, pretty new to Rust. My code looks like this:Somehow
channel.next().awaitalways returnsSome(Err(ChannelError))(eg. the program always goes into theErr(e)part of thematchstatement). Why is that and how can I fix that?Thanks in advance for every bit of help. If that is not the right place to ask about the library, where can I ask about it?
@roderickvd commented on GitHub (Oct 5, 2021):
You could try on the chat over at Gitter. This isn't really a
librespotbug, so I'm closing this issue.If you use the search, you will find a couple of old issues with channel errors. Usually they have been server errors if my memory serves correctly, or at least protocol errors. Best of luck with your endeavour and while learning Rust, do drop by and contribute to
librespotif you can! It's how I learned Rust and look at me now 😆 still learning!@unsuited1 commented on GitHub (Oct 5, 2021):
Thanks for the fast answer!
I'll go and ask over at gitter.