Commit graph

1554 commits

Author SHA1 Message Date
Roderick van Domburg
b1bdf1d7f2
Merge pull request #916 from JasonLG1979/remove-last-unwraps-from-main
Remove `unwrap`s from main
2021-12-27 11:36:03 +01:00
Roderick van Domburg
01fb604420
Allow failures on nightly Rust 2021-12-27 09:47:51 +01:00
Roderick van Domburg
b7c047bca2
Fix alternative tracks 2021-12-27 09:35:11 +01:00
Roderick van Domburg
643b39b40e
Fix discovery compilation with-dns-sd 2021-12-27 00:47:17 +01:00
Roderick van Domburg
b622e3811e
Enable HTTP/2 flow control 2021-12-27 00:45:27 +01:00
JasonLG1979
1f43e9e389 Remove that last couple unwraps from main
Also:

* Don't just hang if Spirc shuts down too often.

* Replace the while loop with Vec retain.

* Be more explicit with the rate limit.
2021-12-26 17:45:06 -06:00
Roderick van Domburg
95776de74a
Fix compilation for with-dns-sd 2021-12-27 00:21:42 +01:00
Roderick van Domburg
8aa23ed0c6
Drop locks as soon as possible 2021-12-27 00:11:07 +01:00
Roderick van Domburg
059e17dca5
Fix tests 2021-12-26 23:51:25 +01:00
Roderick van Domburg
b4f7a9e35e
Change to parking_lot and remove remaining panics 2021-12-26 23:02:02 +01:00
Roderick van Domburg
62461be1fc
Change panics into Result<_, librespot_core::Error> 2021-12-26 21:18:42 +01:00
Roderick van Domburg
4370aa1cbe
Merge pull request #910 from JasonLG1979/fix-alsa-mixer-device
Fix auto fallback for --alsa-mixer-device and --alsa-mixer-index
2021-12-22 08:47:27 +01:00
JasonLG1979
305f80bdfd Fix auto fallback for --alsa-mixer-device and --alsa-mixer-index
As mentioned in https://github.com/librespot-org/librespot/issues/898#issuecomment-986528998
2021-12-21 19:29:35 -06:00
Roderick van Domburg
a297c68913
Make ping estimation less chatty 2021-12-19 00:14:00 +01:00
Roderick van Domburg
0d51fd43dc
Remove unwraps from librespot-audio 2021-12-18 23:44:13 +01:00
Roderick van Domburg
d18a0d1803
Fix caching message when cache is disabled 2021-12-18 14:02:28 +01:00
Roderick van Domburg
9d88ac59c6
Configure User-Agent once 2021-12-18 13:39:41 +01:00
Roderick van Domburg
3b07a6bcb9
Support user-defined temp directories 2021-12-17 20:58:05 +01:00
Roderick van Domburg
97d4d83b7c
cargo fmt 2021-12-16 23:03:30 +01:00
Roderick van Domburg
82b2653c5f
Merge remote-tracking branch 'librespot-org/dev' into new-api-wip 2021-12-16 23:01:56 +01:00
Roderick van Domburg
e5fd7d6506
Merge pull request #899 from JasonLG1979/arg_parse_fixup
Fix incorrect verbose logging of command line options
2021-12-16 22:49:54 +01:00
Roderick van Domburg
2f7b9863d9
Implement CDN for audio files 2021-12-16 22:42:37 +01:00
Jason Gray
306096ee2a
Merge branch 'librespot-org:dev' into arg_parse_fixup 2021-12-15 12:28:09 -06:00
Roderick van Domburg
24e2c6da25
Merge pull request #907 from tomodachi/arm64
Add arm64 target example
2021-12-15 19:02:14 +01:00
Roderick van Domburg
1736e7c52b
Merge pull request #905 from roderickvd/fix-exit-on-decoder-error
Skip track on decoding error
2021-12-15 19:01:15 +01:00
Roderick van Domburg
1cd5f9e571
Merge pull request #896 from JasonLG1979/dynamic-alsa-buffer
Dynamic failable buffer sizing alsa-backend
2021-12-15 18:52:27 +01:00
JasonLG1979
d5efb8a620 Dynamic failable buffer sizing alsa-backend
Dynamically set the alsa buffer and period based on the device's reported min/max buffer and period sizes. In the event of failure use the device's defaults.

This should have no effect on devices that allow for reasonable buffer and period sizes but would allow us to be more forgiving with less reasonable devices or configurations.

Closes: https://github.com/librespot-org/librespot/issues/895
2021-12-14 16:49:09 -06:00
Mateusz Mojsiejuk
67836b5b02 Added arm64 target to docker run examples. Also removed
feature quotes as they're not nessesary and don't match
the non-quoted examples of targets in the WIKI
2021-12-14 21:23:13 +01:00
JasonLG1979
368bee1088 condense some option parsings 2021-12-13 18:43:28 -06:00
JasonLG1979
d29337c62d Dry up error messages. 2021-12-12 23:25:19 -06:00
Roderick van Domburg
8f23c3498f
Clean up warnings 2021-12-12 20:01:05 +01:00
Roderick van Domburg
79c4040a53
Skip track on decoding error 2021-12-12 12:56:02 +01:00
JasonLG1979
8c480b7e39 Fix Command line arguments incorrectly echoed in TRACE
Fix up for #886
Closes: #898

And...

* Don't silently ignore non-Unicode while parsing env vars.

* Iterating over `std::env::args` will panic! on invalid unicode. Let's not do that. `getopts` will catch missing args and exit if those args are required after our error message about the arg not being valid unicode.

* Gaurd against empty strings. There are a few places while parsing options strings that we don't immediately evaluate their validity let's at least makes sure that they are not empty if present.

* `args` is only used in `get_setup` it doesn't need to be in main.

* Nicer help header.

* Get rid of `use std::io::{stderr, Write};` and just use `rpassword::prompt_password_stderr`.

* Get rid of `get_credentials` it was clunky, ugly and only used once. There is no need for it to be a separate function.

* Handle an empty password prompt and password prompt parsing errors.

* + Other random misc clean ups.
2021-12-11 16:24:09 -06:00
Roderick van Domburg
9a93cca562
Get connection ID 2021-12-11 23:06:58 +01:00
Roderick van Domburg
9a31aa0362
Pretty-print trace messages 2021-12-11 20:45:08 +01:00
Roderick van Domburg
e748d543e9
Check availability from the catalogue attribute 2021-12-11 20:22:44 +01:00
Roderick van Domburg
51b6c46fcd
Receive autoplay and other attributes 2021-12-11 16:43:34 +01:00
Roderick van Domburg
9a0d2390b7
Get user attributes and updates 2021-12-11 00:03:35 +01:00
Roderick van Domburg
40163754bb
Update protobufs to 1.1.73.517 2021-12-10 20:33:43 +01:00
Roderick van Domburg
4f51c1e810
Report actual CPU, OS, platform and librespot version 2021-12-09 19:01:54 +01:00
Roderick van Domburg
f3bb679ab1
Rid of the last remaining clippy warnings 2021-12-08 21:00:42 +01:00
Roderick van Domburg
33620280f5
Fix build on Cargo 1.48 2021-12-08 20:44:48 +01:00
Roderick van Domburg
f74c574c9f
Fix lyrics and add simpler endpoint 2021-12-08 20:27:15 +01:00
Roderick van Domburg
9b2ca1442e
Move FileId out of SpotifyId 2021-12-08 19:53:45 +01:00
Roderick van Domburg
f03a7e95c1
Merge remote-tracking branch 'librespot-org/dev' into new-api-wip 2021-12-08 19:11:53 +01:00
Roderick van Domburg
87f6a78d3e
Fix examples 2021-12-07 23:52:34 +01:00
Roderick van Domburg
0e2686863a
Major metadata refactoring and enhancement
* Expose all fields of recent protobufs

 * Add support for user-scoped playlists, user root playlists and
   playlist annotations

 * Convert messages with the Rust type system

 * Attempt to adhere to embargos (tracks and episodes scheduled for
   future release)

 * Return `Result`s with meaningful errors instead of panicking on
   `unwrap`s

 * Add foundation for future playlist editing

 * Up version in connection handshake to get all version-gated features
2021-12-07 23:22:24 +01:00
Roderick van Domburg
7160dc1017
Merge pull request #897 from JasonLG1979/clippy-lints
Address clippy lint warnings from Rust 1.57
2021-12-03 20:07:56 +01:00
JasonLG1979
4370258716 Address clippy lint warnings for rust 1.57 2021-12-03 12:51:41 -06:00
Jason Gray
e66cc5508c
parse environment variables (#886)
Make librespot able to parse environment variables for options and flags.

To avoid name collisions environment variables must be prepended with `LIBRESPOT_` so option/flag `foo-bar` becomes `LIBRESPOT_FOO_BAR`.

Verbose logging mode (`-v`, `--verbose`) logs all parsed environment variables and command line arguments (credentials are redacted).
2021-12-01 21:29:58 +01:00