You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: COMPILING.md
+11-14Lines changed: 11 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,20 +5,15 @@
5
5
In order to compile librespot, you will first need to set up a suitable Rust build environment, with the necessary dependencies installed. You will need to have a C compiler, Rust, and the development libraries for the audio backend(s) you want installed. These instructions will walk you through setting up a simple build environment.
6
6
7
7
### Install Rust
8
-
The easiest, and recommended way to get Rust is to use [rustup](https://rustup.rs). On Unix/MacOS You can install `rustup` with this command:
9
-
10
-
```bash
11
-
curl https://sh.rustup.rs -sSf | sh
12
-
```
13
-
14
-
Follow any prompts it gives you to install Rust. Once that’s done, Rust's standard tools should be setup and ready to use.
8
+
The easiest, and recommended way to get Rust is to use [rustup](https://rustup.rs). Once that’s installed, Rust's standard tools should be set up and ready to use.
15
9
16
10
*Note: The current minimum required Rust version at the time of writing is 1.48, you can find the current minimum version specified in the `.github/workflow/test.yml` file.*
17
11
18
12
#### Additional Rust tools - `rustfmt`
19
-
To ensure a consistent codebase, we utilise [`rustfmt`](https://github.com/rust-lang/rustfmt), which is installed by default with `rustup` these days, else it can be installed manually with:
13
+
To ensure a consistent codebase, we utilise [`rustfmt`](https://github.com/rust-lang/rustfmt) and [`clippy`](https://github.com/rust-lang/rust-clippy), which are installed by default with `rustup` these days, else they can be installed manually with:
20
14
```bash
21
15
rustup component add rustfmt
16
+
rustup component add clippy
22
17
```
23
18
Using `rustfmt` is not optional, as our CI checks against this repo's rules.
24
19
@@ -43,12 +38,13 @@ Depending on the chosen backend, specific development libraries are required.
Assuming you just compiled a ```debug``` build, you can run librespot with the following command:
110
105
111
106
```bash
112
-
./target/debug/librespot -n Librespot
107
+
./target/debug/librespot
113
108
```
114
109
115
110
There are various runtime options, documented in the wiki, and visible by running librespot with the ```-h``` argument.
111
+
112
+
Note that debug builds may cause buffer underruns and choppy audio when dithering is enabled (which it is by default). You can disable dithering with ```--dither none```.
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+14-7Lines changed: 14 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,10 +8,12 @@ If you have encountered a bug, please report it, as we rely on user reports to f
8
8
9
9
Please also make sure that your issues are helpful. To ensure that your issue is helpful, please read over this brief checklist to avoid the more common pitfalls:
10
10
11
-
- Please take a moment to search/read previous similar issues to ensure you aren’t posting a duplicate. Duplicates will be closed immediately.
12
-
- Please include a clear description of what the issue is. Issues with descriptions such as ‘It hangs after 40 minutes’ will be closed immediately.
13
-
- Please include, where possible, steps to reproduce the bug, along with any other material that is related to the bug. For example, if librespot consistently crashes when you try to play a song, please include the Spotify URI of that song. This can be immensely helpful in quickly pinpointing and resolving issues.
14
-
- Lastly, and perhaps most importantly, please include a backtrace where possible. Recent versions of librespot should produce these automatically when it crashes, and print them to the console, but in some cases, you may need to run ‘export RUST_BACKTRACE=full’ before running librespot to enable backtraces.
11
+
- Please take a moment to search/read previous similar issues to ensure you aren’t posting a duplicate. Duplicates will be closed immediately.
12
+
- Please include a clear description of what the issue is. Issues with descriptions such as ‘It hangs after 40 minutes’ will be closed immediately.
13
+
- Please include, where possible, steps to reproduce the bug, along with any other material that is related to the bug. For example, if librespot consistently crashes when you try to play a song, please include the Spotify URI of that song. This can be immensely helpful in quickly pinpointing and resolving issues.
14
+
- Please be alert and respond to questions asked by any project members. Stale issues will be closed.
15
+
- When your issue concerns audio playback, please first make sure that your audio system is set up correctly and can play audio from other applications. This project aims to provide correct audio backends, not to provide Linux support to end users.
16
+
- Lastly, and perhaps most importantly, please include a backtrace where possible. Recent versions of librespot should produce these automatically when it crashes, and print them to the console, but in some cases, you may need to run ‘export RUST_BACKTRACE=full’ before running librespot to enable backtraces.
15
17
16
18
## Contributing Code
17
19
@@ -33,16 +35,21 @@ Unless your changes are negligible, please add an entry in the "Unreleased" sect
33
35
34
36
Make sure that the code is correctly formatted by running:
35
37
```bash
36
-
cargo +stable fmt --all
38
+
cargo fmt --all
37
39
```
38
40
39
-
This command runs the previously installed stable version of ```rustfmt```, a code formatting tool that will automatically correct any formatting that you have used that does not conform with the librespot code style. Once that command has run, you will need to rebuild the project:
41
+
This command runs ```rustfmt```, a code formatting tool that will automatically correct any formatting that you have used that does not conform with the librespot code style. Once that command has run, you will need to rebuild the project:
40
42
41
43
```bash
42
44
cargo build
43
45
```
44
46
45
-
Once it has built, and you have confirmed there are no warnings or errors, you should commit your changes.
47
+
Once it has built, check for common code mistakes by running:
48
+
```bash
49
+
cargo clippy
50
+
```
51
+
52
+
Once you have confirmed there are no warnings or errors, you should commit your changes.
Current maintainer is [@awiouy](https://github.com/awiouy) folks.
5
+
Current maintainers are [listed on GitHub](https://github.com/orgs/librespot-org/people).
6
6
7
7
# librespot
8
8
*librespot* is an open source client library for Spotify. It enables applications to use Spotify's service to control and play music via various backends, and to act as a Spotify Connect receiver. It is an alternative to the official and [now deprecated](https://pyspotify.mopidy.com/en/latest/#libspotify-s-deprecation) closed-source `libspotify`. Additionally, it will provide extra features which are not available in the official library.
9
9
10
-
_Note: librespot only works with Spotify Premium. This will remain the case for the foreseeable future, as we are unlikely to work on implementing the features such as limited skips and adverts that would be required to make librespot compliant with free accounts._
10
+
_Note: librespot only works with Spotify Premium. This will remain the case. We will not any support features to make librespot compatible with free accounts, such as limited skips and adverts._
11
11
12
12
## Quick start
13
13
We're available on [crates.io](https://crates.io/crates/librespot) as the _librespot_ package. Simply run `cargo install librespot` to install librespot on your system. Check the wiki for more info and possible [usage options](https://github.com/librespot-org/librespot/wiki/Options).
14
14
15
-
After installation, you can run librespot from the CLI using a command such as `librespot -n "Librespot Speaker" -b 160` to create a speaker called _Librespot Speaker_ serving 160kbps audio.
15
+
After installation, you can run librespot from the CLI using a command such as `librespot -n "Librespot Speaker" -b 160` to create a speaker called _Librespot Speaker_ serving 160 kbps audio.
16
16
17
17
## This fork
18
18
As the origin by [plietar](https://github.com/plietar/) is no longer actively maintained, this organisation and repository have been set up so that the project may be maintained and upgraded in the future.
@@ -53,12 +53,14 @@ librespot currently offers the following selection of [audio backends](https://g
53
53
```
54
54
Rodio (default)
55
55
ALSA
56
+
GStreamer
56
57
PortAudio
57
58
PulseAudio
58
59
JACK
59
60
JACK over Rodio
60
61
SDL
61
62
Pipe
63
+
Subprocess
62
64
```
63
65
Please check the corresponding [compiling entry](https://github.com/librespot-org/librespot/wiki/Compiling#general-dependencies) for backend specific dependencies.
64
66
@@ -84,9 +86,9 @@ The above is a minimal example. Here is a more fully fledged one:
The above command will create a receiver named ```Librespot```, with bitrate set to 320kbps, initial volume at 75%, with volume normalisation enabled, and the device displayed in the app as an Audio/Video Receiver. A folder named ```cache``` will be created/used in the current directory, and be used to cache audio data and credentials.
89
+
The above command will create a receiver named ```Librespot```, with bitrate set to 320 kbps, initial volume at 75%, with volume normalisation enabled, and the device displayed in the app as an Audio/Video Receiver. A folder named ```cache``` will be created/used in the current directory, and be used to cache audio data and credentials.
88
90
89
-
A full list of runtime options are available [here](https://github.com/librespot-org/librespot/wiki/Options)
91
+
A full list of runtime options is available [here](https://github.com/librespot-org/librespot/wiki/Options).
90
92
91
93
_Please Note: When using the cache feature, an authentication blob is stored for your account in the cache directory. For security purposes, we recommend that you set directory permissions on the cache directory to `700`._
0 commit comments