oSumAtrIX / DownOnSpot

🎧 A Spotify music and playlist downloader working with free Spotify accounts written in Rust
https://osumatrix.me
GNU General Public License v3.0
548 stars 45 forks source link

Can't download anything, it just logins, then nothing #80

Closed andreapavoni closed 2 months ago

andreapavoni commented 2 months ago

Describe the bug I've built DownOnSpot on my MacOS (intel) and tried to build it from source. I had to edit Cargo.toml by removing the logger_env from dependencies (and from main.rs) and used the official librespot library, according to what I've seen in issue #73

I did the first run to generate settings.json, edited it with credentials and the app keys.

For context, I have a premium account.

When running the binary, this is what I get:

./target/release/down_on_spot <some spotify track or album URL>
Settings successfully loaded.
Continuing with spotify account: XXXXXXXXX.
Login succeeded.

Then nothing else.

To Reproduce Steps to reproduce the behavior:

  1. Build DownOnSpot binary from source
  2. Run the binary giving a Spotify track or album URL
  3. nothing happens

Expected behavior I expected the track or album to be downloaded

oSumAtrIX commented 2 months ago

I'm not sure; it's a dupe of https://github.com/oSumAtrIX/DownOnSpot/issues/53, but that should've been resolved. Maybe you are missing the shared libraries.

andreapavoni commented 2 months ago

@oSumAtrIX yes, you're right! It's a duplicate of the #53 followed that thread, it works like a charm!

Also, if you want, I can open a PR with those small changes I mentioned above.

I have some confidence with Rust, but almost zero experience with these libraries (I've used some spotify rust library in the past, but only for APIs), I'd be glad to help anyway.

oSumAtrIX commented 2 months ago

Can you please mention what exactly fixed your issue?

Also, if you want, I can open a PR with those small changes I mentioned above.

What kind of changes are you referring to?

andreapavoni commented 2 months ago

I did the following changes to the code:

compiled with Rust v1.77.2

EDIT: my issue with getting it working has been fixed by using a "cleaned" URL, for example:

from: https://open.spotify.com/intl-it/track/1rXWi5LOQTes7AHv4JiP1f?si=4191f9f4bff94d4f

to: https://open.spotify.com/track/1rXWi5LOQTes7AHv4JiP1f

oSumAtrIX commented 2 months ago

Why would env_logger need to be removed? If there's any issue with the crate on MacOS, probably opening an issue here would make more sense.

In regards to the link, parsing should indeed be fixed.

andreapavoni commented 2 months ago

@oSumAtrIX

Why would env_logger need to be removed? If there's any issue with the crate on MacOS, probably opening an issue here would make more sense.

I had problems with dependencies, I've got some weird errors with the wrong versioning, but I wasn't able to figure out why. I know that package because I've used it in other projects, but I don't know why it gave errors with dependencies. I can only guess it's related to the dependency tree with other libraries used in this project.

In regards to the link, parsing should indeed be fixed.

I can try to figure out how to parse the URL properly:

oSumAtrIX commented 2 months ago

I think its as easy as first parsing the string to an URL,, then extracting the segment from the path that comes after the track segment. Should work universally for all track URls regardless of query parameters.