Giter Club home page Giter Club logo

downonspot's Introduction

My interests and expertise expand from graphics-, motion- and sound design in dedicated software like Adobe Suite and Image-Line FL Studio up to programming in lots of different languages like Kotlin, Rust, C#, Java, PHP, HTML, JavaScript, CSS, MySQL, Objective-C, C, Python and Visual Basic, with the first being my most and last being my least used languages. I mostly use my brief time productively, but I usually play chess, osu!, or Krunker if I don't. Because of peer pressure, I generally hang around on Discord but maintain daily activity on my email inbox and a couple of other forums.
๐Ÿ”ญ Currently working on ReVanced
๐Ÿฅ‡ Studying computer science at University of Augsburg
๐Ÿ  Home at osumatrix.me
๐ŸŽผ I play ๐Ÿฅ and ๐ŸŽธ
Metrics

downonspot's People

Contributors

45ninjas avatar breuerfelix avatar ckcr4lyf avatar docmarty84 avatar giacy86 avatar grufkork avatar icycoldified avatar osumatrix avatar sraka1 avatar thatpix3l avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

downonspot's Issues

Nothing visible happens after launch.

Describe the bug
I configured everything as it was described in instruction and launched .\down_on_spot.exe command then nothing happened.
(screenshot 3.)

To Reproduce
Steps to reproduce the behavior:

  1. Clone the repository
  2. Change librespot in Cargo.toml like in instruction because i have premium account (screenshot 1.)
  3. Build project
  4. Run .\down_on_spot.exe
  5. Change settings.rs (screenshot 4.)

Expected behavior
Any information should be displayed because I don't know what is happening.

Screenshots
1.
image

image

image

image

If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Windows 10

Additional context
Powershell 7

Can't download playlist with local files.

Hi, I tried to download a playlist with local files in it, but it won't work.
Is there any way that it can ignore the local files and download the ones that can be downloaded?
Also, can you make the song downloadable even if it isn't available in my country?

Support downloading list from a file

Hey,
since it was not possible to add support for downloading album categories as described in #5 it would be cool to manually copy all album ulrs into a file and use this file to download albums with downonspot.

Something like:

down_on_spot albums_file.txt

Regards
Jonas

Cannot Build Application [invalid number of arguments]

To Reproduce
Steps to reproduce the behavior:
clone repo,
cd into repo,
install rust-nightly,
edit toml,
install visual studio and c++ dependencies,
Attempt to build.

Screenshots
image
image

Desktop (please complete the following information):

  • OS: Win10

`free-librespot` is unavailable on GitHub, cannot build.

Describe the bug

~/Projects/work/DownOnSpot (main) ยป cargo fetch --locked --target "x86_64-unknown-linux-gnu"
    Updating git repository `ssh://[email protected]/oSumAtrIX/free-librespot.git`
error: failed to get `librespot` as a dependency of package `down_on_spot v0.2.2 (/home/saltedcoffee/Projects/work/DownOnSpot)`

Caused by:
  failed to load source for dependency `librespot`

Caused by:
  Unable to update ssh://[email protected]/oSumAtrIX/free-librespot.git?branch=dev

Caused by:
  failed to fetch into: /home/saltedcoffee/.cargo/git/db/free-librespot-257f6fd081e0ebd3

Caused by:
  process didn't exit successfully: `git fetch --force --update-head-ok 'ssh://[email protected]/oSumAtrIX/free-librespot.git' '+refs/heads/dev:refs/remotes/origin/dev'` (exit status: 128)
  --- stderr
  ERROR: Repository not found.
  fatal: Could not read from remote repository.

  Please make sure you have the correct access rights
  and the repository exists.

To Reproduce
Steps to reproduce the behavior:

  1. Clone DownOnSpot repository
  2. Run cargo fetch

Expected behavior
ssh://[email protected]/oSumAtrIX/free-librespot.git or https://github.com/oSumAtrIX/free-librespot should be available

Desktop (please complete the following information):

  • Arch Linux x86_64 rolling

Additional context

https://github.com/oSumAtrIX/free-librespot is additionally unavailable on the web. I am in the European Union and I've also attempted to VPN to the United States. This would suggest a takedown rather than country unavailability. Did you make the repository private?

Program exits without downloading files.

Describe the bug
Program exists without downloading music and without any error/indication of something going wrong

Expected behavior
Downloading of files should start

Screenshots
image

Desktop (please complete the following information):

  • OS: Windows 10

Additional context
Adding a debug option should be helpful for future issues

Template for track order in playlist

I'm trying to download a spotify playlist for my music class. I really need to include the playlist # in the filename, because we study the pieces inside chronologically, but I can't find a template for it. So far I've tried %0track% and %track%, but it seems to be track number of the album the piece is in, not of the playlist.

Describe the solution you'd like
A new template for the playlist number of the piece.

Convert to rspotify and add podcast support

Is your feature request related to a problem? Please describe.
I want to download podcast episodes, but with aspotify this doesn't seem possible. As the lib is deprecated and rspotify provides the same functionality plus a lot more it would be better to use rspotify instead.

Describe the solution you'd like
Use rspotify instead of aspotify

Thank you guys and keep up the awesome work!

Can't figure out how to access `free-librespot`

Describe the bug
I've been scratching my head over this for over a week but can't seem to successfully access your free-librespot git. I've tried following different YouTube videos, created SSH key from GitHub but still unsuccessful.

To Reproduce
Steps I've tried so far:

  1. ssh-keygen -t rsa -C "hammadXP" (Filename: Default, Passphrase: Empty)
  2. cd /d ".ssh"
  3. start-ssh-agent
  4. Then created new SSH key on GitHub: Key type: Authentication Key (Default), Key: contents of id_rsa.pub file
  5. Then tried running git clone "ssh://[email protected]/oSumAtrIX/free-librespot.git" and still got the ERROR: Repository not found.

Expected behavior
The free-librespot git repository should be accessible with the SSH Key.

Desktop (please complete the following information):

  • OS: Windows 11

Additional context
I can use your app with temporary premium subscription because I'm a free user, but if a free way is available, I would like to take it. I know this issue has been opened at least two times but you just answer with looking at the readme but that doesn't help mush. Can you please try giving the procedure yourself and also if the git is actually not down. Thanks ๐Ÿ™‚

Support file format with sub-directories

Hey, it would be cool to download an artist by having the albums as directories in the downloads directory. For example:

"filename_template": "%artist%/%album% (%year%)/%track%. %title%",

Is this possible? Would be a sane default in my opinion.

Config file location

Built and ran the executable. Got the expected message saying that the configuration file was generated but it's not found in the directory where I'm running the exe. Where would it be located at?

image

Allow Building without mp3 support

Is your feature request related to a problem? Please describe.
Installing the libmp3lame dependency on macOS looks annoying, and I don't plan on using the mp3 feature anyway, so it'd be nice to not include it in the build process.

Describe the solution you'd like
An option to build without mp3 conversion support, excluding mp3lame

sanitize_filename used incorrectly

Describe the bug
Using sanitize_filename::sanitize with default options possibly truncates some parts of the track filename. However, the final assembled filename is not truncated at all, which may exceed file name limits of some filesystems (e.g. utf 8 - Is the Ext3 filename limited to 255 symbols or 255 bytes? - Server Fault

To Reproduce
Steps to reproduce the behavior:

  1. Set the filename_template to %0track% %artist% - %title% - %title% - %title% - %title%

    "filename_template": "%0track% %artist% - %title% - %title% - %title% - %title%",
  2. Run

    down_on_spot spotify:track:1JTU0397lTr8kM4ghhG0Cf
  3. Observe IO: InvalidFilename File name too long (os error 36)

    Settings successfully loaded.
    Continuing with spotify account: [email protected]
    Login succeeded.
    Preparing...       | Track 1 - Die Dritte Macht - Perry Rhodan - Silber Edition 1
    
    Elapsed second(s): 0
    IO: InvalidFilename File name too long (os error 36) | Track 1 - Die Dritte Macht - Perry Rhodan - Silber Edition 1
    Finished download(s) in 4 second(s).
    

Expected behavior
Applying sanitize to each component of the assembled track title path (including the extension!) instead of arbitrary tags gives a better result.

For example, in Python the applicable algorithm would be (sorry, I don't speak Rust):

path = "/".join((sanitize(_p) for _p in path.split("/")))

Desktop (please complete the following information):

  • OS: GNU/Linux Ubuntu 10.04

Support release year template variable

Is your feature request related to a problem? Please describe.

I'd like to be consistent with my existing media library naming scheme. The only missing part is that DownOnSpot doesn't provide the relase year of an album as template variable (i.e. 2016)

Describe the solution you'd like

DownOnSpot should provide a template variable (i.e. %albumYear%).

Login failed: Authentication Error

Login failed, possibly due to invalid credentials or settings: Authentication Error

I'm currently having issues using the application. While no information has changed, I can no longer log into spotify with a premium account. I simply get the error above. Earlier this year, this issue did not exist. I checked the api stuff, nothing changed there. I also generated a new client id and secret id, that didn't work either. I even deleted the settings.json, let it recreate, and refilled the information. Still no luck.

The username and password are correct as I can log into spotify with the same information. I've no idea what's going on here. Is this an isolated issue only to me or is the whole application not working now? I don't have another account to test it with.

Add cargo.lock file

cargo.lock file is missing which makes it more difficult to package it for NixOS

Add variable that adds leading zero(s) to the track number

Is your feature request related to a problem? Please describe.

I'd like to be consistent with my existing media library naming scheme. The only missing part is that DownOnSpot doesn't support leading zeros in front of the track number.

Describe the solution you'd like

I'd like DownOnSpot to provide a template variable that adds a leading zero before track numbers <10.
It could either be specified with how many digits it should have (i.e. {track:00}) or add a {track_zerofied} variable that would support track numbers <100 (I can't come up with a smart name though).

Liked songs

Is your feature request related to a problem? Please describe.

AFAIK, it is not possible to download the entirety of the liked songs of an account (edit: you can, but it requires the web/electron client and making a new playlist), as Spotify does not provide the option to share it.
Would It be possible to have an option to download the liked songs?

Describe the solution you'd like

I see two solutions:

  • Making a playlist from the liked songs (potentially keeping it updated) from the client and downloading from it (could help for users that want to share their songs as well; might need need another issue)
  • Fetching all the songs and downloading them directly

Additional context


Love your project, you are saving me a ton of time. Could help with PR (not only this issue) in about two weeks when I'm back from vacation.

configure the recording volume

Is your feature request related to a problem? Please describe.
When I save files as mp3, the volume is very low. I usually have my volume around 30% when playing directly from the Spotify app, but when playing the mp3 files, I need to turn the volume up to around 80%.

Describe the solution you'd like
It'd be nice if there was a config option to set the volume level, similar to the lame --scale option.

Additional context
Nothing else to add.

Option to embed album art in files/download separately

Is your feature request related to a problem? Please describe.
When downloading songs, if I would like album art to be embedded in the file produced, I have to add it manually using an external tag editor (e.g. Kid3).

Describe the solution you'd like
An option to automatically embed album art in downloaded files or download it separately.

Additional context

Stream #0:1: Video: mjpeg (Baseline), yuvj420p(pc, bt470bg/unknown/unknown), 640x640 [SAR 96:96 DAR 1:1], 90k tbr, 90k tbn (attached pic)
  Metadata:
    comment         : Cover (front)

Thanks,
pointy

free-librespot removed and not accessible with SSH key

Describe the bug
A clear and concise description of what the bug is.
Apparently free-librespot is removed or the private key doesn't have access to it. Error fatal: repository '[email protected]/oSumAtrIX/free-librespot.git' does not exist occurs
To Reproduce
Steps to reproduce the behavior:

  1. Download and set SSH key (tried both ssh-agent and config file)
  2. Check authentication with ssh -T [email protected](successful)
  3. git clone [email protected]/oSumAtrIX/free-librespot.git
  4. Git fails to fetch repository

Expected behavior
A clear and concise description of what you expected to happen.
Repository being cloned.
Screenshots
If applicable, add screenshots to help explain your problem.
IMG_20230116_125028

Desktop (please complete the following information):

  • OS: Linux ARM (Termux)

Additional context
Add any other context about the problem here.

No method named unwrap found for struct

Describe the bug
Build failed -> No method named unwrap found for struct

To Reproduce
Steps to reproduce the behavior:

Debian Buster
rust version 1.65.0-nightly

cargo build --release

Build Log

Compiling librespot v0.3.1
error[E0061]: this function takes 3 arguments but 4 arguments were supplied
--> src/spotify.rs:34:9
|
34 | Some(Cache::new(Some(Path::new("credentials_cache")), None, None, None).unwrap()),
| ^^^^^^^^^^ ---- argument of type std::option::Option<_> unexpected
|
note: associated function defined here
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/librespot-core-0.3.1/src/cache.rs:240:12
|
240 | pub fn new<P: AsRef>(
| ^^^
help: remove the extra argument
|
34 | Some(Cache::new(Some(Path::new("credentials_cache")), None, None).unwrap()),
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

error[E0061]: this function takes 3 arguments but 4 arguments were supplied
--> src/spotify.rs:31:22
|
31 | let (session, _) = Session::connect(
| ^^^^^^^^^^^^^^^^
...
35 | true,
| ---- argument of type bool unexpected
|
note: associated function defined here
--> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/librespot-core-0.3.1/src/session.rs:65:18
|
65 | pub async fn connect(
| ^^^^^^^
help: remove the extra argument
|
31 | let (session, _) = Session::connect(SessionConfig::default(), credentials, Some(Cache::new(Some(Path::new("credentials_cache")), None, None, None).unwrap()))
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

error[E0308]: mismatched types
--> src/spotify.rs:31:7
|
31 | let (session, ) = Session::connect(
| ^^^^^^^^^^^^-
| | |
| | expected struct Session, found tuple
32 | | SessionConfig::default(),
33 | | credentials,
34 | | Some(Cache::new(Some(Path::new("credentials_cache")), None, None, None).unwrap()),
35 | | true,
36 | | )
37 | | .await?;
| |
____- this expression has type Session
|
= note: expected struct Session
found tuple (_, _)

error[E0599]: no method named unwrap found for struct std::string::String in the current scope
--> src/downloader.rs:507:52
|
507 | info!("{} Using {:?} format.", id.to_base62().unwrap(), format);
| ^^^^^^ method not found in std::string::String

error[E0599]: no method named unwrap found for struct std::string::String in the current scope
--> src/downloader.rs:518:53
|
518 | warn!("{} Falling back to: {:?}", id.to_base62().unwrap(), quality);
| ^^^^^^ method not found in std::string::String

error[E0599]: no method named unwrap found for struct std::string::String in the current scope
--> src/downloader.rs:576:54
|
576 | info!("Done downloading: {}", track.id.to_base62().unwrap());
| ^^^^^^ method not found in std::string::String

Some errors have detailed explanations: E0061, E0308, E0599.
For more information about an error, try rustc --explain E0061.
error: could not compile down_on_spot due to 6 previous errors

fails to build with librespot 0.4.1

Describe the bug
Latest git master appears to fail to build with librespot 0.4.1:

[...]
     Running `rustc --crate-name down_on_spot --edition=2018 src/main.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type bin --emit=dep-info,link -C opt-level=z -C panic=abort -C lto -C codegen-units=1 -C metadata=aa39fab80418720c -C extra-filename=-aa39fab80418720c --out-dir /var/tmp/paludis/build/dev-rust-down_on_spot-0.2.0/work/DownOnSpot-cad94d74e9ebd2a926c9d0ece6f43fed14da0d16/target/release/deps -C strip=symbols -L dependency=/var/tmp/paludis/build/dev-rust-down_on_spot-0.2.0/work/DownOnSpot-cad94d74e9ebd2a926c9d0ece6f43fed14da0d16/target/release/deps --extern aspotify=/var/tmp/paludis/build/dev-rust-down_on_spot-0.2.0/work/DownOnSpot-cad94d74e9ebd2a926c9d0ece6f43fed14da0d16/target/release/deps/libaspotify-3d852b42ac3c0fd5.rlib --extern async_std=/var/tmp/paludis/build/dev-rust-down_on_spot-0.2.0/work/DownOnSpot-cad94d74e9ebd2a926c9d0ece6f43fed14da0d16/target/release/deps/libasync_std-584bfecd61e96e9b.rlib --extern async_stream=/var/tmp/paludis/build/dev-rust-down_on_spot-0.2.0/work/DownOnSpot-cad94d74e9ebd2a926c9d0ece6f43fed14da0d16/target/release/deps/libasync_stream-13b28bb4a41a6f4e.rlib --extern chrono=/var/tmp/paludis/build/dev-rust-down_on_spot-0.2.0/work/DownOnSpot-cad94d74e9ebd2a926c9d0ece6f43fed14da0d16/target/release/deps/libchrono-b6bcec46be8af3fe.rlib --extern clap=/var/tmp/paludis/build/dev-rust-down_on_spot-0.2.0/work/DownOnSpot-cad94d74e9ebd2a926c9d0ece6f43fed14da0d16/target/release/deps/libclap-03d30cccd0fdd37b.rlib --extern colored=/var/tmp/paludis/build/dev-rust-down_on_spot-0.2.0/work/DownOnSpot-cad94d74e9ebd2a926c9d0ece6f43fed14da0d16/target/release/deps/libcolored-be2e0a4e74392096.rlib --extern dirs=/var/tmp/paludis/build/dev-rust-down_on_spot-0.2.0/work/DownOnSpot-cad94d74e9ebd2a926c9d0ece6f43fed14da0d16/target/release/deps/libdirs-c25871509c978ea6.rlib --extern futures=/var/tmp/paludis/build/dev-rust-down_on_spot-0.2.0/work/DownOnSpot-cad94d74e9ebd2a926c9d0ece6f43fed14da0d16/target/release/deps/libfutures-c75800f9d5c398ca.rlib --extern id3=/var/tmp/paludis/build/dev-rust-down_on_spot-0.2.0/work/DownOnSpot-cad94d74e9ebd2a926c9d0ece6f43fed14da0d16/target/release/deps/libid3-8763aa4b1a4aac36.rlib --extern lame=/var/tmp/paludis/build/dev-rust-down_on_spot-0.2.0/work/DownOnSpot-cad94d74e9ebd2a926c9d0ece6f43fed14da0d16/target/release/deps/liblame-fd027a582b23205f.rlib --extern lewton=/var/tmp/paludis/build/dev-rust-down_on_spot-0.2.0/work/DownOnSpot-cad94d74e9ebd2a926c9d0ece6f43fed14da0d16/target/release/deps/liblewton-063eb5229c29146f.rlib --extern librespot=/var/tmp/paludis/build/dev-rust-down_on_spot-0.2.0/work/DownOnSpot-cad94d74e9ebd2a926c9d0ece6f43fed14da0d16/target/release/deps/liblibrespot-f16cb0bc6570ea88.rlib --extern log=/var/tmp/paludis/build/dev-rust-down_on_spot-0.2.0/work/DownOnSpot-cad94d74e9ebd2a926c9d0ece6f43fed14da0d16/target/release/deps/liblog-bcec5e812547e20c.rlib --extern oggvorbismeta=/var/tmp/paludis/build/dev-rust-down_on_spot-0.2.0/work/DownOnSpot-cad94d74e9ebd2a926c9d0ece6f43fed14da0d16/target/release/deps/liboggvorbismeta-5c8c13f15f02c049.rlib --extern protobuf=/var/tmp/paludis/build/dev-rust-down_on_spot-0.2.0/work/DownOnSpot-cad94d74e9ebd2a926c9d0ece6f43fed14da0d16/target/release/deps/libprotobuf-cd6754c7a9ae51f8.rlib --extern reqwest=/var/tmp/paludis/build/dev-rust-down_on_spot-0.2.0/work/DownOnSpot-cad94d74e9ebd2a926c9d0ece6f43fed14da0d16/target/release/deps/libreqwest-64c6a387a59d8d54.rlib --extern sanitize_filename=/var/tmp/paludis/build/dev-rust-down_on_spot-0.2.0/work/DownOnSpot-cad94d74e9ebd2a926c9d0ece6f43fed14da0d16/target/release/deps/libsanitize_filename-4bb7e209f20c5bb6.rlib --extern serde=/var/tmp/paludis/build/dev-rust-down_on_spot-0.2.0/work/DownOnSpot-cad94d74e9ebd2a926c9d0ece6f43fed14da0d16/target/release/deps/libserde-9c6bbe49fcef0f4d.rlib --extern serde_json=/var/tmp/paludis/build/dev-rust-down_on_spot-0.2.0/work/DownOnSpot-cad94d74e9ebd2a926c9d0ece6f43fed14da0d16/target/release/deps/libserde_json-c6b6feb44f3fe8b6.rlib --extern tokio=/var/tmp/paludis/build/dev-rust-down_on_spot-0.2.0/work/DownOnSpot-cad94d74e9ebd2a926c9d0ece6f43fed14da0d16/target/release/deps/libtokio-ce317e2ef4916b06.rlib --extern url=/var/tmp/paludis/build/dev-rust-down_on_spot-0.2.0/work/DownOnSpot-cad94d74e9ebd2a926c9d0ece6f43fed14da0d16/target/release/deps/liburl-cadf23cdef707d32.rlib -L native=/usr/x86_64-pc-linux-gnu/lib`
error[E0061]: this function takes 4 arguments but 3 arguments were supplied
  --> src/spotify.rs:29:17
   |
29 |         let session = Session::connect(SessionConfig::default(), credentials, None).await?;
   |                       ^^^^^^^^^^^^^^^^ ------------------------  -----------  ---- supplied 3 arguments
   |                       |
   |                       expected 4 arguments
   |
note: associated function defined here
  --> /var/cache/paludis/distfiles/cargo-home/registry/src/github.com-1ecc6299db9ec823/librespot-core-0.4.1/src/session.rs:65:18
   |
65 |     pub async fn connect(
   |                  ^^^^^^^

error[E0308]: mismatched types
  --> src/spotify.rs:37:16
   |
37 |         Ok(Spotify { session, spotify })
   |                      ^^^^^^^ expected struct `Session`, found tuple
   |
   = note: expected struct `Session`
               found tuple `(Session, Credentials)`

error[E0277]: `Result<std::string::String, FromUtf8Error>` doesn't implement `std::fmt::Display`
   --> src/downloader.rs:507:37
    |
507 |                     info!("{} Using {:?} format.", id.to_base62(), format);
    |                                                    ^^^^^^^^^^^^^^ `Result<std::string::String, FromUtf8Error>` cannot be formatted with the default formatter
    |
    = help: the trait `std::fmt::Display` is not implemented for `Result<std::string::String, FromUtf8Error>`
    = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
    = note: this error originates in the macro `format_args` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: `Result<std::string::String, FromUtf8Error>` doesn't implement `std::fmt::Display`
   --> src/downloader.rs:518:38
    |
518 |             warn!("{} Falling back to: {:?}", id.to_base62(), quality);
    |                                               ^^^^^^^^^^^^^^ `Result<std::string::String, FromUtf8Error>` cannot be formatted with the default formatter
    |
    = help: the trait `std::fmt::Display` is not implemented for `Result<std::string::String, FromUtf8Error>`
    = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
    = note: this error originates in the macro `format_args` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: `Result<std::string::String, FromUtf8Error>` doesn't implement `std::fmt::Display`
   --> src/downloader.rs:576:33
    |
576 |         info!("Done downloading: {}", track.id.to_base62());
    |                                       ^^^^^^^^^^^^^^^^^^^^ `Result<std::string::String, FromUtf8Error>` cannot be formatted with the default formatter
    |
    = help: the trait `std::fmt::Display` is not implemented for `Result<std::string::String, FromUtf8Error>`
    = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
    = note: this error originates in the macro `format_args` (in Nightly builds, run with -Z macro-backtrace for more info)

Some errors have detailed explanations: E0061, E0277, E0308.
For more information about an error, try `rustc --explain E0061`.
error: could not compile `down_on_spot` due to 5 previous errors

Caused by:
  process didn't exit successfully: `rustc --crate-name down_on_spot --edition=2018 src/main.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type bin --emit=dep-info,link -C opt-level=z -C panic=abort -C lto -C codegen-units=1 -C metadata=aa39fab80418720c -C extra-filename=-aa39fab80418720c --out-dir /var/tmp/paludis/build/dev-rust-down_on_spot-0.2.0/work/DownOnSpot-cad94d74e9ebd2a926c9d0ece6f43fed14da0d16/target/release/deps -C strip=symbols -L dependency=/var/tmp/paludis/build/dev-rust-down_on_spot-0.2.0/work/DownOnSpot-cad94d74e9ebd2a926c9d0ece6f43fed14da0d16/target/release/deps --extern aspotify=/var/tmp/paludis/build/dev-rust-down_on_spot-0.2.0/work/DownOnSpot-cad94d74e9ebd2a926c9d0ece6f43fed14da0d16/target/release/deps/libaspotify-3d852b42ac3c0fd5.rlib --extern async_std=/var/tmp/paludis/build/dev-rust-down_on_spot-0.2.0/work/DownOnSpot-cad94d74e9ebd2a926c9d0ece6f43fed14da0d16/target/release/deps/libasync_std-584bfecd61e96e9b.rlib --extern async_stream=/var/tmp/paludis/build/dev-rust-down_on_spot-0.2.0/work/DownOnSpot-cad94d74e9ebd2a926c9d0ece6f43fed14da0d16/target/release/deps/libasync_stream-13b28bb4a41a6f4e.rlib --extern chrono=/var/tmp/paludis/build/dev-rust-down_on_spot-0.2.0/work/DownOnSpot-cad94d74e9ebd2a926c9d0ece6f43fed14da0d16/target/release/deps/libchrono-b6bcec46be8af3fe.rlib --extern clap=/var/tmp/paludis/build/dev-rust-down_on_spot-0.2.0/work/DownOnSpot-cad94d74e9ebd2a926c9d0ece6f43fed14da0d16/target/release/deps/libclap-03d30cccd0fdd37b.rlib --extern colored=/var/tmp/paludis/build/dev-rust-down_on_spot-0.2.0/work/DownOnSpot-cad94d74e9ebd2a926c9d0ece6f43fed14da0d16/target/release/deps/libcolored-be2e0a4e74392096.rlib --extern dirs=/var/tmp/paludis/build/dev-rust-down_on_spot-0.2.0/work/DownOnSpot-cad94d74e9ebd2a926c9d0ece6f43fed14da0d16/target/release/deps/libdirs-c25871509c978ea6.rlib --extern futures=/var/tmp/paludis/build/dev-rust-down_on_spot-0.2.0/work/DownOnSpot-cad94d74e9ebd2a926c9d0ece6f43fed14da0d16/target/release/deps/libfutures-c75800f9d5c398ca.rlib --extern id3=/var/tmp/paludis/build/dev-rust-down_on_spot-0.2.0/work/DownOnSpot-cad94d74e9ebd2a926c9d0ece6f43fed14da0d16/target/release/deps/libid3-8763aa4b1a4aac36.rlib --extern lame=/var/tmp/paludis/build/dev-rust-down_on_spot-0.2.0/work/DownOnSpot-cad94d74e9ebd2a926c9d0ece6f43fed14da0d16/target/release/deps/liblame-fd027a582b23205f.rlib --extern lewton=/var/tmp/paludis/build/dev-rust-down_on_spot-0.2.0/work/DownOnSpot-cad94d74e9ebd2a926c9d0ece6f43fed14da0d16/target/release/deps/liblewton-063eb5229c29146f.rlib --extern librespot=/var/tmp/paludis/build/dev-rust-down_on_spot-0.2.0/work/DownOnSpot-cad94d74e9ebd2a926c9d0ece6f43fed14da0d16/target/release/deps/liblibrespot-f16cb0bc6570ea88.rlib --extern log=/var/tmp/paludis/build/dev-rust-down_on_spot-0.2.0/work/DownOnSpot-cad94d74e9ebd2a926c9d0ece6f43fed14da0d16/target/release/deps/liblog-bcec5e812547e20c.rlib --extern oggvorbismeta=/var/tmp/paludis/build/dev-rust-down_on_spot-0.2.0/work/DownOnSpot-cad94d74e9ebd2a926c9d0ece6f43fed14da0d16/target/release/deps/liboggvorbismeta-5c8c13f15f02c049.rlib --extern protobuf=/var/tmp/paludis/build/dev-rust-down_on_spot-0.2.0/work/DownOnSpot-cad94d74e9ebd2a926c9d0ece6f43fed14da0d16/target/release/deps/libprotobuf-cd6754c7a9ae51f8.rlib --extern reqwest=/var/tmp/paludis/build/dev-rust-down_on_spot-0.2.0/work/DownOnSpot-cad94d74e9ebd2a926c9d0ece6f43fed14da0d16/target/release/deps/libreqwest-64c6a387a59d8d54.rlib --extern sanitize_filename=/var/tmp/paludis/build/dev-rust-down_on_spot-0.2.0/work/DownOnSpot-cad94d74e9ebd2a926c9d0ece6f43fed14da0d16/target/release/deps/libsanitize_filename-4bb7e209f20c5bb6.rlib --extern serde=/var/tmp/paludis/build/dev-rust-down_on_spot-0.2.0/work/DownOnSpot-cad94d74e9ebd2a926c9d0ece6f43fed14da0d16/target/release/deps/libserde-9c6bbe49fcef0f4d.rlib --extern serde_json=/var/tmp/paludis/build/dev-rust-down_on_spot-0.2.0/work/DownOnSpot-cad94d74e9ebd2a926c9d0ece6f43fed14da0d16/target/release/deps/libserde_json-c6b6feb44f3fe8b6.rlib --extern tokio=/var/tmp/paludis/build/dev-rust-down_on_spot-0.2.0/work/DownOnSpot-cad94d74e9ebd2a926c9d0ece6f43fed14da0d16/target/release/deps/libtokio-ce317e2ef4916b06.rlib --extern url=/var/tmp/paludis/build/dev-rust-down_on_spot-0.2.0/work/DownOnSpot-cad94d74e9ebd2a926c9d0ece6f43fed14da0d16/target/release/deps/liburl-cadf23cdef707d32.rlib -L native=/usr/x86_64-pc-linux-gnu/lib` (exit status: 1)

To Reproduce
Steps to reproduce the behavior:

  1. Clone project
  2. Edit Cargo.toml to use librespot 0.4.1
  3. Try to build
  4. See error

Expected behavior
Allow to build with latest librespot release 0.4.1, using 0.3.1 instead works well though.

Desktop (please complete the following information):

  • OS: Linux

Additional context

Running in a Docker container doesn't download anything

Describe the bug
When running the application in a Docker container nothing gets downloaded. The application just finishes without an error message.

To Reproduce
Steps to reproduce the behavior:

  1. docker run -it ubuntu bash
  2. from a second shell:
    a. docker cp target/release bc410c0e362c:/usr/local/DownOnSpot
  3. run the application from the first shell

Expected behavior
Files should be downloaded into the directory configured in the settings file.

  • OS: Linux, Ubuntu 20.04

Additional context
looks like self.spotify.resolve_uri(&uri) (downloader.rs, Line 88) is causing the problem.

MacOS Compilation is Broken

Describe the bug
Compiling DownOnSpot on MacOS fails due to an import error for std::os::windows

To Reproduce
Compile on MacOS

Expected behavior
Compilation is successful

Desktop (please complete the following information):

  • OS: MacOS Ventura

Additional context
This import was introduced in aa3c09b

not manage to start download with `down_on_spot.exe`

Hi !
I make the whole instalation uing README guide. The web app is ready, tokens writtens in settings.json (on APPDATA ; im on windows).
So, now, i try. Login sucessfull ! Well, cool !
But when I try to add anything more (link), that not working. Like if i just didn't send link, and no more reaction (no message, nor download starting)
See :
image

So, what's could be wrong ?
Its probably a fail on my side, but where ? In the spotify dev app ?
Or in the .\down_on_spot.exe link argument syntaxe ? Could you send me just a screen of a working download command ? (search everywhere, but don't find one)

Thank in advance for your help, and thank for your work on this app !

Better SSH Tutorial

Hi, is there a better SSH tutorial?
Still doesn't know what to do after reading the current tutorial.

record

Does it record the audio or does it rip the DRM?

Cannot compile the project

Describe the bug
A clear and concise description of what the bug is.
Hi, I'm new to Rust so this issue may be dumb, but I thought it could be helpful to ask in case other noobs like me run into it.

I am unable to compile the project (cargo build --release) gives me a series of errors.

To Reproduce
Steps to reproduce the behavior:

  1. I installed the rust, then set it to the nightly version: cargo 1.59.0-nightly (fcef61230 2021-12-17)
  2. I removed librespot because I dont need to download the music with a free spotify account, I want to try with a premium account.
  3. I installed the VS C++ build suite.
  4. I tried to run cargo build --release but it gives me errors.

Expected behavior
I think it's supposed to build and give the message you described in the README of this project

Screenshots

Here are the errors I get:

error[E0433]: failed to resolve: use of undeclared crate or module `librespot`
 --> src\downloader.rs:6:5
  |
6 | use librespot::audio::{AudioDecrypt, AudioFile};
  |     ^^^^^^^^^ use of undeclared crate or module `librespot`

error[E0433]: failed to resolve: use of undeclared crate or module `librespot`
 --> src\downloader.rs:7:5
  |
7 | use librespot::core::audio_key::AudioKey;
  |     ^^^^^^^^^ use of undeclared crate or module `librespot`

error[E0433]: failed to resolve: use of undeclared crate or module `librespot`
 --> src\downloader.rs:8:5
  |
8 | use librespot::core::session::Session;
  |     ^^^^^^^^^ use of undeclared crate or module `librespot`

error[E0433]: failed to resolve: use of undeclared crate or module `librespot`
 --> src\downloader.rs:9:5
  |
9 | use librespot::core::spotify_id::SpotifyId;
  |     ^^^^^^^^^ use of undeclared crate or module `librespot`

error[E0433]: failed to resolve: use of undeclared crate or module `librespot`
  --> src\downloader.rs:10:5
   |
10 | use librespot::metadata::{FileFormat, Metadata, Track};
   |     ^^^^^^^^^ use of undeclared crate or module `librespot`

error[E0433]: failed to resolve: use of undeclared crate or module `librespot`
 --> src\spotify.rs:2:5
  |
2 | use librespot::core::authentication::Credentials;
  |     ^^^^^^^^^ use of undeclared crate or module `librespot`

error[E0433]: failed to resolve: use of undeclared crate or module `librespot`
 --> src\spotify.rs:3:5
  |
3 | use librespot::core::config::SessionConfig;
  |     ^^^^^^^^^ use of undeclared crate or module `librespot`

error[E0433]: failed to resolve: use of undeclared crate or module `librespot`
 --> src\spotify.rs:4:5
  |
4 | use librespot::core::session::Session;
  |     ^^^^^^^^^ use of undeclared crate or module `librespot`

error[E0433]: failed to resolve: use of undeclared type `SpotifyId`
   --> src\downloader.rs:494:12
    |
494 |         let id = SpotifyId::from_base62(id)?;
    |                  ^^^^^^^^^ use of undeclared type `SpotifyId`

error[E0433]: failed to resolve: use of undeclared type `AudioFile`
   --> src\downloader.rs:537:19
    |
537 |         let encrypted = AudioFile::open(session, *file_id, 1024 * 1024, true).await?;
    |                         ^^^^^^^^^ use of undeclared type `AudioFile`

error[E0433]: failed to resolve: use of undeclared type `AudioDecrypt`
   --> src\downloader.rs:587:24
    |
587 |             let mut decrypted = AudioDecrypt::new(key, encrypted);
    |                                 ^^^^^^^^^^^^ use of undeclared type `AudioDecrypt`

error[E0433]: failed to resolve: use of undeclared type `AudioDecrypt`
   --> src\downloader.rs:625:24
    |
625 |             let mut decrypted = AudioDecrypt::new(key, encrypted);
    |                                 ^^^^^^^^^^^^ use of undeclared type `AudioDecrypt`

error[E0433]: failed to resolve: use of undeclared type `FileFormat`
   --> src\downloader.rs:686:4
    |
686 |             FileFormat::OGG_VORBIS_96 => Self::Ogg,
    |             ^^^^^^^^^^ use of undeclared type `FileFormat`

error[E0433]: failed to resolve: use of undeclared type `FileFormat`
   --> src\downloader.rs:687:4
    |
687 |             FileFormat::OGG_VORBIS_160 => Self::Ogg,
    |             ^^^^^^^^^^ use of undeclared type `FileFormat`

error[E0433]: failed to resolve: use of undeclared type `FileFormat`
   --> src\downloader.rs:688:4
    |
688 |             FileFormat::OGG_VORBIS_320 => Self::Ogg,
    |             ^^^^^^^^^^ use of undeclared type `FileFormat`

error[E0433]: failed to resolve: use of undeclared type `FileFormat`
   --> src\downloader.rs:689:4
    |
689 |             FileFormat::MP3_256 => Self::Mp3,
    |             ^^^^^^^^^^ use of undeclared type `FileFormat`

error[E0433]: failed to resolve: use of undeclared type `FileFormat`
   --> src\downloader.rs:690:4
    |
690 |             FileFormat::MP3_320 => Self::Mp3,
    |             ^^^^^^^^^^ use of undeclared type `FileFormat`

error[E0433]: failed to resolve: use of undeclared type `FileFormat`
   --> src\downloader.rs:691:4
    |
691 |             FileFormat::MP3_160 => Self::Mp3,
    |             ^^^^^^^^^^ use of undeclared type `FileFormat`

error[E0433]: failed to resolve: use of undeclared type `FileFormat`
   --> src\downloader.rs:692:4
    |
692 |             FileFormat::MP3_96 => Self::Mp3,
    |             ^^^^^^^^^^ use of undeclared type `FileFormat`

error[E0433]: failed to resolve: use of undeclared type `FileFormat`
   --> src\downloader.rs:693:4
    |
693 |             FileFormat::MP3_160_ENC => Self::Mp3,
    |             ^^^^^^^^^^ use of undeclared type `FileFormat`

error[E0433]: failed to resolve: use of undeclared type `FileFormat`
   --> src\downloader.rs:694:4
    |
694 |             FileFormat::MP4_128_DUAL => Self::Mp4,
    |             ^^^^^^^^^^ use of undeclared type `FileFormat`

error[E0433]: failed to resolve: use of undeclared type `FileFormat`
   --> src\downloader.rs:695:4
    |
695 |             FileFormat::OTHER3 => Self::Unknown,
    |             ^^^^^^^^^^ use of undeclared type `FileFormat`

error[E0433]: failed to resolve: use of undeclared type `FileFormat`
   --> src\downloader.rs:696:4
    |
696 |             FileFormat::AAC_160 => Self::Aac,
    |             ^^^^^^^^^^ use of undeclared type `FileFormat`

error[E0433]: failed to resolve: use of undeclared type `FileFormat`
   --> src\downloader.rs:697:4
    |
697 |             FileFormat::AAC_320 => Self::Aac,
    |             ^^^^^^^^^^ use of undeclared type `FileFormat`

error[E0433]: failed to resolve: use of undeclared type `FileFormat`
   --> src\downloader.rs:698:4
    |
698 |             FileFormat::MP4_128 => Self::Mp4,
    |             ^^^^^^^^^^ use of undeclared type `FileFormat`

error[E0433]: failed to resolve: use of undeclared type `FileFormat`
   --> src\downloader.rs:699:4
    |
699 |             FileFormat::OTHER5 => Self::Unknown,
    |             ^^^^^^^^^^ use of undeclared type `FileFormat`

error[E0433]: failed to resolve: use of undeclared type `FileFormat`
   --> src\downloader.rs:709:5
    |
709 |                 FileFormat::OGG_VORBIS_320,
    |                 ^^^^^^^^^^ use of undeclared type `FileFormat`

error[E0433]: failed to resolve: use of undeclared type `FileFormat`
   --> src\downloader.rs:710:5
    |
710 |                 FileFormat::AAC_320,
    |                 ^^^^^^^^^^ use of undeclared type `FileFormat`

error[E0433]: failed to resolve: use of undeclared type `FileFormat`
   --> src\downloader.rs:711:5
    |
711 |                 FileFormat::MP3_320,
    |                 ^^^^^^^^^^ use of undeclared type `FileFormat`

error[E0433]: failed to resolve: use of undeclared type `FileFormat`
   --> src\downloader.rs:713:23
    |
713 |             Self::Q256 => vec![FileFormat::MP3_256],
    |                                ^^^^^^^^^^ use of undeclared type `FileFormat`

error[E0433]: failed to resolve: use of undeclared type `FileFormat`
   --> src\downloader.rs:715:5
    |
715 |                 FileFormat::OGG_VORBIS_160,
    |                 ^^^^^^^^^^ use of undeclared type `FileFormat`

error[E0433]: failed to resolve: use of undeclared type `FileFormat`
   --> src\downloader.rs:716:5
    |
716 |                 FileFormat::AAC_160,
    |                 ^^^^^^^^^^ use of undeclared type `FileFormat`

error[E0433]: failed to resolve: use of undeclared type `FileFormat`
   --> src\downloader.rs:717:5
    |
717 |                 FileFormat::MP3_160,
    |                 ^^^^^^^^^^ use of undeclared type `FileFormat`

error[E0433]: failed to resolve: use of undeclared type `FileFormat`
   --> src\downloader.rs:719:22
    |
719 |             Self::Q96 => vec![FileFormat::OGG_VORBIS_96, FileFormat::MP3_96],
    |                               ^^^^^^^^^^ use of undeclared type `FileFormat`

error[E0433]: failed to resolve: use of undeclared type `FileFormat`
   --> src\downloader.rs:719:49
    |
719 |             Self::Q96 => vec![FileFormat::OGG_VORBIS_96, FileFormat::MP3_96],
    |                                                          ^^^^^^^^^^ use of undeclared type `FileFormat`

error[E0433]: failed to resolve: use of undeclared crate or module `librespot`
  --> src\error.rs:59:11
   |
59 | impl From<librespot::core::mercury::MercuryError> for SpotifyError {
   |           ^^^^^^^^^ use of undeclared crate or module `librespot`

error[E0433]: failed to resolve: use of undeclared crate or module `librespot`
  --> src\error.rs:60:13
   |
60 |     fn from(_: librespot::core::mercury::MercuryError) -> Self {
   |                ^^^^^^^^^ use of undeclared crate or module `librespot`

error[E0433]: failed to resolve: use of undeclared crate or module `librespot`
  --> src\error.rs:65:11
   |
65 | impl From<librespot::core::session::SessionError> for SpotifyError {
   |           ^^^^^^^^^ use of undeclared crate or module `librespot`

error[E0433]: failed to resolve: use of undeclared crate or module `librespot`
  --> src\error.rs:66:13
   |
66 |     fn from(e: librespot::core::session::SessionError) -> Self {
   |                ^^^^^^^^^ use of undeclared crate or module `librespot`

error[E0433]: failed to resolve: use of undeclared crate or module `librespot`
  --> src\error.rs:68:4
   |
68 |             librespot::core::session::SessionError::IoError(e) => e.into(),
   |             ^^^^^^^^^ use of undeclared crate or module `librespot`

error[E0433]: failed to resolve: use of undeclared crate or module `librespot`
  --> src\error.rs:69:4
   |
69 |             librespot::core::session::SessionError::AuthenticationError(_) => {
   |             ^^^^^^^^^ use of undeclared crate or module `librespot`

error[E0433]: failed to resolve: use of undeclared crate or module `librespot`
  --> src\error.rs:76:11
   |
76 | impl From<librespot::core::spotify_id::SpotifyIdError> for SpotifyError {
   |           ^^^^^^^^^ use of undeclared crate or module `librespot`

error[E0433]: failed to resolve: use of undeclared crate or module `librespot`
  --> src\error.rs:77:13
   |
77 |     fn from(_: librespot::core::spotify_id::SpotifyIdError) -> Self {
   |                ^^^^^^^^^ use of undeclared crate or module `librespot`

error[E0433]: failed to resolve: use of undeclared crate or module `librespot`
  --> src\error.rs:82:11
   |
82 | impl From<librespot::core::channel::ChannelError> for SpotifyError {
   |           ^^^^^^^^^ use of undeclared crate or module `librespot`

error[E0433]: failed to resolve: use of undeclared crate or module `librespot`
  --> src\error.rs:83:13
   |
83 |     fn from(_: librespot::core::channel::ChannelError) -> Self {
   |                ^^^^^^^^^ use of undeclared crate or module `librespot`

error[E0433]: failed to resolve: use of undeclared crate or module `librespot`
  --> src\error.rs:88:11
   |
88 | impl From<librespot::core::audio_key::AudioKeyError> for SpotifyError {
   |           ^^^^^^^^^ use of undeclared crate or module `librespot`

error[E0433]: failed to resolve: use of undeclared crate or module `librespot`
  --> src\error.rs:89:13
   |
89 |     fn from(_: librespot::core::audio_key::AudioKeyError) -> Self {
   |                ^^^^^^^^^ use of undeclared crate or module `librespot`

error[E0433]: failed to resolve: use of undeclared type `Credentials`
  --> src\spotify.rs:25:21
   |
25 |         let credentials = Credentials::with_password(username, password);
   |                           ^^^^^^^^^^^ use of undeclared type `Credentials`

error[E0433]: failed to resolve: use of undeclared type `Session`
  --> src\spotify.rs:26:17
   |
26 |         let session = Session::connect(SessionConfig::default(), credentials, None).await?;
   |                       ^^^^^^^ use of undeclared type `Session`

error[E0433]: failed to resolve: use of undeclared type `SessionConfig`
  --> src\spotify.rs:26:34
   |
26 |         let session = Session::connect(SessionConfig::default(), credentials, None).await?;
   |                                        ^^^^^^^^^^^^^ use of undeclared type `SessionConfig`

error[E0412]: cannot find type `Session` in this scope
   --> src\downloader.rs:475:38
    |
475 |     async fn find_alternative(session: &Session, track : Track) -> Result<Track, SpotifyError> {
    |                                         ^^^^^^^ not found in this scope

error[E0412]: cannot find type `Track` in this scope
   --> src\downloader.rs:475:55
    |
475 |     async fn find_alternative(session: &Session, track : Track) -> Result<Track, SpotifyError> {
    |                                                          ^^^^^ not found in this scope
    |
help: consider importing this struct
    |
1   | use aspotify::Track;
    |

error[E0412]: cannot find type `Track` in this scope
   --> src\downloader.rs:475:72
    |
475 |     async fn find_alternative(session: &Session, track : Track) -> Result<Track, SpotifyError> {
    |                                                                           ^^^^^ not found in this scope
    |
help: consider importing this struct
    |
1   | use aspotify::Track;
    |

error[E0433]: failed to resolve: use of undeclared type `Track`
   --> src\downloader.rs:477:12
    |
477 |             let t = Track::get(&session, alt).await?;
    |                     ^^^^^ not found in this scope
    |
help: consider importing this struct
    |
1   | use aspotify::Track;
    |

error[E0412]: cannot find type `Session` in this scope
   --> src\downloader.rs:487:13
    |
487 |         session: &Session,
    |                   ^^^^^^^ not found in this scope

error[E0433]: failed to resolve: use of undeclared type `Track`
   --> src\downloader.rs:495:19
    |
495 |         let mut track = Track::get(session, id).await?;
    |                         ^^^^^ not found in this scope
    |
help: consider importing this struct
    |
1   | use aspotify::Track;
    |

error[E0412]: cannot find type `AudioFile` in this scope
   --> src\downloader.rs:582:14
    |
582 |         encrypted: AudioFile,
    |                    ^^^^^^^^^ not found in this scope

error[E0412]: cannot find type `AudioKey` in this scope
   --> src\downloader.rs:583:8
    |
583 |         key: AudioKey,
    |              ^^^^^^^^ not found in this scope

error[E0412]: cannot find type `AudioFile` in this scope
   --> src\downloader.rs:618:14
    |
618 |         encrypted: AudioFile,
    |                    ^^^^^^^^^ not found in this scope

error[E0412]: cannot find type `AudioKey` in this scope
   --> src\downloader.rs:619:8
    |
619 |         key: AudioKey,
    |              ^^^^^^^^ not found in this scope

error[E0412]: cannot find type `FileFormat` in this scope
   --> src\downloader.rs:683:11
    |
683 | impl From<FileFormat> for AudioFormat {
    |     -     ^^^^^^^^^^ not found in this scope
    |     |
    |     help: you might be missing a type parameter: `<FileFormat>`

error[E0412]: cannot find type `FileFormat` in this scope
   --> src\downloader.rs:684:13
    |
    |                ^^^^^^^^^^ not found in this scope
error[E0412]: cannot find type `FileFormat` in this scope
   --> src\downloader.rs:706:40
    |
704 | impl Quality {
    |     - help: you might be missing a type parameter: `<FileFormat>`
705 |     /// Get librespot FileFormat
706 |     pub fn get_file_formats(&self) -> Vec<FileFormat> {
    |                                           ^^^^^^^^^^ not found in this scope

error[E0412]: cannot find type `Session` in this scope
  --> src\spotify.rs:12:15
   |
12 |     pub session: Session,
   |                  ^^^^^^^ not found in this scope

error[E0599]: no method named `next` found for struct `Pin<&mut _>` in the current scope
   --> src\downloader.rs:558:30
    |
558 |         while let Some(result) = s.next().await {
    |                                    ^^^^ method not found in `Pin<&mut _>`
    |
    = note: `s` is a function, perhaps you wish to call it

Some errors have detailed explanations: E0412, E0433, E0599.
For more information about an error, try `rustc --explain E0412`.
error: could not compile `down_on_spot` due to 65 previous errors

Desktop (please complete the following information):

  • OS: Windows 10

Additional context

Lmk know if you need any other information

Audio Key Error

The program exits without downloading anything, giving the message "Audio Key Error"

image

It doesn't matter if I give a track link or if I use the search function. My config file is identical to the one automatically generated, except for the account credentials (free account) and client_id and client_secret. I also tried to create a new Spotify App from the dashboard and using different client credentials but the issue persists.

silent failure to download

Describe the bug
after compilation compilation, it failes silently...
it is compiled,
then executing:


Settings successfully loaded.
Continuing with spotify account: <RED>.
Login succeeded.

Nothing happens, no download, am i using it wrong, or is ClientID / Secret to be filled-out, other than standard?

settings:

{
  "username": "<RED>",
  "password": "<RED>",
  "client_id": "client_id",
  "client_secret": "secret",
  "refresh_ui_seconds": 1,
  "downloader": {
    "concurrent_downloads": 4,
    "quality": "Q320",
    "path": "downloads",
    "filename_template": "%artist% - %title%",
    "id3v24": true,
    "convert_to_mp3": false,
    "separator": ", "
  }
}

used brew install lame to get lame mp3 on my system.

To Reproduce

bash-3.2$ ./down_on_spot https://open.spotify.com/playlist/6bYg4fYfP0TNNKpOqLDRSR

Expected behavior
a download, progress or failue, instead, jumps straight to terminal

  • OS: (MacOsx Darwin 19.6.0 Darwin Kernel Version 19.6.0: Thu Nov 11 20:02:32 PST 2021; root:xnu-6153.141.49~1/RELEASE_X86_64 x86_64),
  • Basically old Macbook Air

Can't find the config file!!

Describe the bug
After successfully building the app, i run it once then get:
"Settings successfully loaded.
Continuing with spotify account: username."
I need to find the config file to set my logins but it can't be found anywhere.

A quick "dir" prompt in the "DownOnSpot\target\release" returns:
Mode LastWriteTime Length Name


d----- 26/04/2022 22:55 .fingerprint
d----- 26/04/2022 22:55 build
d----- 26/04/2022 22:57 deps
d----- 26/04/2022 22:55 examples
d----- 26/04/2022 22:55 incremental
-a---- 26/04/2022 22:55 0 .cargo-lock
-a---- 26/04/2022 22:57 464 down_on_spot.d
-a---- 26/04/2022 22:57 3685376 down_on_spot.exe
-a---- 22/10/2017 14:00 1081856 libmp3lame.dll

i've looked everywhere for the file but can'tfind it although i has to exist because it says it's been loaded. It's driving me nuts.

OS : Running on Windows 11 x64

Additionnal info :
I've built the app with the premium spotify version, hence i left the librespot dependency empty.

Thanks in advance for any help!

Template variables in path not being replaced with their values

Basically the title. Setting the path as C:/Users/[user]/Downloads/%albumArtist%/%album%, for example, creates two folders, literally named "%albumArtist%" and "%album%".

Your README mentions that template variables are available in the path. Or am I using it wrong?

Google login?

Hey,
what do I put in the password in the config field if I log in with a Google login?

  • OS: Debian 12

A way to handle special characters in hyperlinks

Is your feature request related to a problem? Please describe.
No that i've managed to get downOnSpot up and running, i've come across a new problem : some spotify links contain special characters such as "&" that create an error as the command prompt interprets them as something different i guess.

Describe the solution you'd like
Is there a way to bypass this issue? i've tried putting the link between "" as suggested in other forums, i've also tried the following : start "down_on_spot;exe" "link" which doesn't work either.
I'm pretty sure there is a simple way to get around this that i'm not aware of.

Any help would be gladly appreciated thanks!

Unable to build project

Describe the bug
Attempting to build but encounter issue with steam-cipher version within crates.io

$ cargo build --release
    Updating crates.io index
error: failed to select a version for the requirement `stream-cipher = "^0.3"`
candidate versions found which didn't match: 0.99.99, 0.7.1, 0.6.0, ...
location searched: crates.io index
required by package `aes-ctr v0.3.0`
    ... which satisfies dependency `aes-ctr = "^0.3"` of package `librespot-audio v0.1.5`
    ... which satisfies dependency `librespot-audio = "^0.1.5"` of package `librespot v0.1.5`
    ... which satisfies dependency `librespot = "^0.1.5"` of package `down_on_spot v0.2.0 

To Reproduce
Steps to reproduce the behavior:

Using Rust cargo 1.62.0-nightly (f63f23ff1 2022-04-28)
Have Spotify Premium so removed free-librespot line and set to librespot = "0.1.5" in cargo.toml
Run cargo build --release in Git Bash dir containing clone of DownOnSpot

Expected behavior
Expected down_on_spot.exe to compile successfully so I can set config for spotify account and try downloading a playlist.

Screenshots
Error output added above

Desktop (please complete the following information):

  • OS: Windows 10

Additional context
Not sure whether there's additional config I've missed or if this is someting inherant with newer versions of rust
Hopefully I've not missed any additional info needed.

Does not compile on macOS 12

Describe the bug
7 errors trying to build the application with cargo build --release

To Reproduce
Steps to reproduce the behavior:

cargo build --release

Compiling down_on_spot v0.2.2 (/Users/tom/workspace/DownOnSpot)
error[E0308]: mismatched types
--> src/spotify.rs:34:25
|
34 | Some(Cache::new(Some(Path::new("credentials_cache")), None, None, None).unwrap()),
| ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected u64, found &std::path::Path
| |
| arguments to this enum variant are incorrect
|
note: tuple variant defined here

error[E0061]: this function takes 3 arguments but 4 arguments were supplied
--> src/spotify.rs:34:9
|
34 | Some(Cache::new(Some(Path::new("credentials_cache")), None, None, None).unwrap()),
| ^^^^^^^^^^ ---- argument of type std::option::Option<_> unexpected
|
note: associated function defined here
--> /Users/tom/.cargo/registry/src/github.com-1ecc6299db9ec823/librespot-core-0.3.1/src/cache.rs:240:12
|
240 | pub fn new<P: AsRef>(
| ^^^
help: remove the extra argument
|
34 | Some(Cache::new(Some(Path::new("credentials_cache")), None, None).unwrap()),
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

error[E0061]: this function takes 3 arguments but 4 arguments were supplied
--> src/spotify.rs:31:22
|
31 | let (session, _) = Session::connect(
| ^^^^^^^^^^^^^^^^
...
35 | true,
| ---- argument of type bool unexpected
|
note: associated function defined here
--> /Users/tom/.cargo/registry/src/github.com-1ecc6299db9ec823/librespot-core-0.3.1/src/session.rs:65:18
|
65 | pub async fn connect(
| ^^^^^^^
help: remove the extra argument
|
31 | let (session, _) = Session::connect(SessionConfig::default(), credentials, Some(Cache::new(Some(Path::new("credentials_cache")), None, None, None).unwrap()))
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

error[E0308]: mismatched types
--> src/spotify.rs:31:7
|
31 | let (session, ) = Session::connect(
| ^^^^^^^^^^^^-
| | |
| | expected struct Session, found tuple
32 | | SessionConfig::default(),
33 | | credentials,
34 | | Some(Cache::new(Some(Path::new("credentials_cache")), None, None, None).unwrap()),
35 | | true,
36 | | )
37 | | .await?;
| |
____- this expression has type Session
|
= note: expected struct Session
found tuple (_, _)

error[E0599]: no method named unwrap found for struct std::string::String in the current scope
--> src/downloader.rs:507:52
|
507 | info!("{} Using {:?} format.", id.to_base62().unwrap(), format);
| ^^^^^^ method not found in std::string::String

error[E0599]: no method named unwrap found for struct std::string::String in the current scope
--> src/downloader.rs:518:53
|
518 | warn!("{} Falling back to: {:?}", id.to_base62().unwrap(), quality);
| ^^^^^^ method not found in std::string::String

error[E0599]: no method named unwrap found for struct std::string::String in the current scope
--> src/downloader.rs:576:54
|
576 | info!("Done downloading: {}", track.id.to_base62().unwrap());
| ^^^^^^ method not found in std::string::String

Some errors have detailed explanations: E0061, E0308, E0599.
For more information about an error, try rustc --explain E0061.
error: could not compile down_on_spot due to 7 previous errors

Expected behavior
Expected DownOnSpot.exe to be compiled

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: macOS 12

Additional context
Using:
cargo --version
cargo 1.64.0-nightly (c0bbd42ce 2022-07-03)

Added librespot = "0.3.1" in the Cargo.toml file

Downloading song fails: Channel error

Hey,
sometimes I get following error message:

Channel Error      | Rolling Moon
Finished download(s) in 20 second(s).

When I try the download again, it succeeds and the missing file was downloaded correctly.
Maybe DownOnSpot should try downloading again 2-3 times.

Regards
Jonas

Skip already downloaded files

Hi,
it works fine most of the time. However, sometime it stops downloading and it won't download till I restart. However, the it again downloads all previously downloaded songs.

Is there a way to skip already downloaded files?

main does not compile on Ubuntu Or MacOS

Describe the bug
main does not compile on Ubuntu Or MacOS

To Reproduce
Steps to reproduce the behavior:

Compiling down_on_spot v0.2.2 (/root/DownOnSpot) error[E0308]: mismatched types --> src/spotify.rs:34:25 | 34 | Some(Cache::new(Some(Path::new("credentials_cache")), None, None, None).unwrap()), | ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected u64, found &std::path::Path`
| |
| arguments to this enum variant are incorrect
|
note: tuple variant defined here

error[E0061]: this function takes 3 arguments but 4 arguments were supplied
--> src/spotify.rs:34:9
|
34 | Some(Cache::new(Some(Path::new("credentials_cache")), None, None, None).unwrap()),
| ^^^^^^^^^^ ---- argument unexpected
|
note: associated function defined here
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/librespot-core-0.3.1/src/cache.rs:240:12
|
240 | pub fn new<P: AsRef>(
| ^^^
help: remove the extra argument
|
34 | Some(Cache::new(Some(Path::new("credentials_cache")), None, None).unwrap()),
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

error[E0061]: this function takes 3 arguments but 4 arguments were supplied
--> src/spotify.rs:31:22
|
31 | let (session, _) = Session::connect(
| ^^^^^^^^^^^^^^^^
...
35 | true,
| ---- argument unexpected
|
note: associated function defined here
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/librespot-core-0.3.1/src/session.rs:65:18
|
65 | pub async fn connect(
| ^^^^^^^
help: remove the extra argument
|
31 | let (session, _) = Session::connect(SessionConfig::default(), credentials, Some(Cache::new(Some(Path::new("credentials_cache")), None, None, None).unwrap()))
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

error[E0308]: mismatched types
--> src/spotify.rs:31:7
|
31 | let (session, ) = Session::connect(
| ^^^^^^^^^^^^-
| | |
| | expected struct Session, found tuple
32 | | SessionConfig::default(),
33 | | credentials,
34 | | Some(Cache::new(Some(Path::new("credentials_cache")), None, None, None).unwrap()),
35 | | true,
36 | | )
37 | | .await?;
| |
____- this expression has type Session
|
= note: expected struct Session
found tuple (_, _)

error[E0599]: no method named unwrap found for struct std::string::String in the current scope
--> src/downloader.rs:507:52
|
507 | info!("{} Using {:?} format.", id.to_base62().unwrap(), format);
| ^^^^^^ method not found in std::string::String

error[E0599]: no method named unwrap found for struct std::string::String in the current scope
--> src/downloader.rs:518:53
|
518 | warn!("{} Falling back to: {:?}", id.to_base62().unwrap(), quality);
| ^^^^^^ method not found in std::string::String

error[E0599]: no method named unwrap found for struct std::string::String in the current scope
--> src/downloader.rs:576:54
|
576 | info!("Done downloading: {}", track.id.to_base62().unwrap());
| ^^^^^^ method not found in std::string::String

Some errors have detailed explanations: E0061, E0308, E0599.
For more information about an error, try rustc --explain E0061.
error: could not compile down_on_spot due to 7 previous errors
`

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: MacOS 11 and Ubuntu 20

Additional context
Add any other context about the problem here.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.