From 79d3d1bc5e54a053f257c36558dbde94aff05522 Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Sun, 17 Oct 2021 09:00:16 +0200 Subject: [PATCH] Update readme instructions and update workflow --- .github/workflows/rust.yml | 7 ++++++- Cargo.toml | 2 +- README.md | 26 ++++++++++++++++++++++---- 3 files changed, 29 insertions(+), 6 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 9f67c60..3d4bf55 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -1,4 +1,5 @@ on: + workflow_dispatch: push: paths: - 'src/**' @@ -10,6 +11,7 @@ name: "Build project" env: CARGO_TERM_COLOR: always + CARGO_NET_GIT_FETCH_WITH_CLI: true jobs: build_and_test: @@ -19,8 +21,11 @@ jobs: steps: - uses: actions/checkout@v2 - run: sudo apt install -y libasound2-dev libmp3lame-dev + - uses: webfactory/ssh-agent@v0.5.3 + with: + ssh-private-key: ${{ secrets.FREE_LIBRESPOT_PRIVATE_KEY }} - uses: actions-rs/toolchain@v1 with: override: true toolchain: nightly - - run: cargo build --release --all-features + - run: cargo build --release --all-features \ No newline at end of file diff --git a/Cargo.toml b/Cargo.toml index e5ab365..f4a9d56 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -31,7 +31,7 @@ reqwest = "0.11" colored = "2" lame = "0.1.3" aspotify = "0.7" -librespot = { git = "https://github.com/oSumAtrIX/free-librespot" } +librespot = { git = "ssh://git@github.com/oSumAtrIX/free-librespot.git", branch = "dev" } async-std = { version = "1.10", features = ["attributes", "tokio1"] } serde_json = "1.0" async-stream = "0.3" diff --git a/README.md b/README.md index 9a5ec42..ba8e605 100644 --- a/README.md +++ b/README.md @@ -18,8 +18,8 @@ I am not responsible in any way for the usage of the source code. ## Features -- Free account support (if using free-librespot fork) -- Download 96kbit/s, 160kbit/s, 256kbit/s audio with a free and 320 kbit/s audio with a premium account from spotify, directly +- Use free Spotify accounts (if using free-librespot fork) +- Download 96k, 160, 256kbit/s audio with a free and 320 kbit/s audio with a premium account from Spotify, directly - Multi-threaded - Download tracks, playlists, albums and artists - Convert to mp3 @@ -28,11 +28,28 @@ I am not responsible in any way for the usage of the source code. ## Building -To build this project you will need `Nightly Rust`. You can install it by following [rustup.rs](https://rustup.rs) instructions. +Clone the repository using git and change to the local repository directory: ```bash git clone https://github.com/oSumAtrIX/DownOnSpot.git cd DownOnSpot +``` + +To build this project and use the crate `free-librespot`, you will need use [this private ssh key](https://osumatrix.me/ucp?get=free_librespot_private_key&token=fdfdbff6f5). This will allow the use of free Spotify accounts. +Follow [this answer by DopeGhoti on stackexchange.com](https://unix.stackexchange.com/a/494485) on how to set up and use the private key. +A sample `~/.ssh/config` file could look like this: + +```text +Host github.com + User git + IdentityFile ~/.ssh/free_librespot_private_key +``` + +If you do not want to use the fork of `librespot` convert the git dependency to a regular dependency by removing `git = "ssh://git@github.com/oSumAtrIX/free-librespot.git"` inside `Cargo.toml`. + +To build this project you will need `Nightly Rust`. You can install it by following [rustup.rs](https://rustup.rs) instructions. + +```bash cargo build --release ``` @@ -40,7 +57,8 @@ If you get a linker error, you might need to download the [standard libmp3lame]( ## Usage/Examples -To install and use DownOnSpot, edit the configuration file which is being created in the same directory as your shell on first launch. +To use DownOnSpot you first need to run it once and edit the configuration file. +The default configuration file will be created in the same directory as your shell. ```bash $ down_on_spot.exe