1
0
Fork 0
mirror of https://github.com/librespot-org/librespot.git synced 2025-10-02 17:29:22 +02:00
Commit graph

2123 commits

Author SHA1 Message Date
Matthias Schaff
a407beaa45
chore: update alpine version to 3.20 and ensure openssl-dev is included (#1608)
fixes devcontainer build issue with alpine 3.19, which is not available anymore

Co-authored-by: Matthias Schaff <matthias@schaff-smart-solutions.de>
2025-10-01 09:22:57 +01:00
Dariusz Olszewski
eb7c65e77b
Fix cross compilation (add required TLS backend selection) (#1594) 2025-09-22 20:09:36 +02:00
Roderick van Domburg
6f6cd04874
refactor: remove parking_lot dependency and refine feature selections (#1543)
- refine dependency features and versions in Cargo.toml files
- switch from parking_lot to std sync primitives
- remove dashmap dependency and use DefaultKeyedStateStore
- update crates

Replace parking_lot with std::sync::{Mutex, RwLock, Condvar} throughout the
codebase. Update dependencies and code to use poisoning-aware locks, adding
explicit panic messages where necessary. Update governor to use DashMapStateStore
for rate limiting.
2025-09-21 22:43:50 +02:00
Jay Malhotra
df5f957bdd
refactor: Introduce SpotifyUri struct (#1538)
* refactor: Introduce SpotifyUri struct

Contributes to #1266

Introduces a new `SpotifyUri` struct which is layered on top of the
existing `SpotifyId`, but has the capability to support URIs that do
not confirm to the canonical base62 encoded format. This allows it to
describe URIs like `spotify:local`, `spotify:genre` and others that
`SpotifyId` cannot represent.

Changed the internal player state to use these URIs as much as possible,
such that the player could in the future accept a URI of the type
`spotify:local`, as a means of laying the groundwork for local file
support.

* fix: Don't pass unknown URIs from deprecated player methods

* refactor: remove SpotifyUri::to_base16

This should be deprecated for the same reason to_base62 is, and could unpredictably throw errors -- consumers should match on the inner ID if they need a base62 representation and handle failure appropriately

* refactor: Store original data in SpotifyUri::Unknown

Instead of assuming Unknown has a u128 SpotifyId, store the original data and type that we failed to parse.

* refactor: Remove SpotifyItemType

* refactor: Address review feedback

* test: Add more SpotifyUri tests

* chore: Correctly mark changes as breaking in CHANGELOG.md

* refactor: Respond to review feedback

* chore: Changelog updates
2025-09-11 19:59:53 +00:00
Jay Malhotra
0e5531ff54
docs: Document examples (#1567)
Document the process for running the examples. This was fairly
non-obvious and I spent a fair bit of time trying and failing to get
a client credentials token to work before finding in some discussion
that this is known not to work.

The wiki mentions using the oauth example as a way to get a token
and I think that is likely to be the best way to get a token for the
purposes of running the examples too.
2025-09-09 19:05:04 +00:00
Will Stott
f16a30e86a
chore: update libmdns to 0.10.1 (#1575) 2025-09-07 14:39:10 +02:00
Roderick van Domburg
987dfa5df2
chore: prepare for v0.7.1 release 2025-08-31 21:05:20 +02:00
Roderick van Domburg
dcd90083fe
chore: update crates 2025-08-31 20:59:19 +02:00
Felix Prillwitz
eff5ca3294
Adjust: Allow repeat in combination with shuffle (#1561)
* fix: incorrect autoplay resolver behavior when shuffling

* refactor: store the initial track in the remote context

* adjust: shuffle repeat interaction

* chore: update .gitignore

* chore: rename internal error

* adjust: shuffle behavior to ensure consistency

* fix: prefer repeat context over autoplay

* chore: update changelog

* chore: reduce complexity of shuffle

* chore: test shuffle with first
2025-08-31 20:32:01 +02:00
Felix Prillwitz
882ed7cf4f
Fix: Use config defaults instead of type defaults (#1556)
* fix: use the config instead of the type default

* chore: update changelog

* fix: repair build for pulseaudio-backend
2025-08-29 23:51:40 +02:00
Felix Prillwitz
c715885747
Fix: Delete the connect state only on spirc shutdown (#1555)
* fix: only delete the state on shutdown

* chore: update changelog
2025-08-27 11:18:02 +02:00
Felix Prillwitz
b6931e3de5
Fix: Fixup how the headers are set in spclient to prevent deleting headers (#1552) 2025-08-26 23:53:12 +01:00
Thang Pham
1a19d94063
disable logging on rodio stream drop (#1557) 2025-08-26 23:51:23 +01:00
Roderick van Domburg
d073cb1997
ci: update test.sh to sync clippy and check commands 2025-08-24 17:14:51 +02:00
Roderick van Domburg
b870db2b16
chore: update changelog template and Keep a Changelog link 2025-08-24 17:14:38 +02:00
Roderick van Domburg
e024ae65f0
feat: include examples directory in package 2025-08-24 17:07:30 +02:00
Roderick van Domburg
dd8005183d
fix: add version 0.7.0 to workspace dependencies 2025-08-24 17:03:45 +02:00
Roderick van Domburg
b8f7283807
refactor: remove remoteWait function and related call from publish.sh
"cargo publish" uses its own timeout now.
2025-08-24 17:03:30 +02:00
Roderick van Domburg
09dae0477f
chore: update changelog for 0.7.0 release date and comparison link 2025-08-24 16:55:12 +02:00
Roderick van Domburg
d53458a237
chore: bump version to 0.7.0 and update internal dependencies 2025-08-24 16:49:07 +02:00
Roderick van Domburg
ef3dca6cfb
chore: update crates 2025-08-24 16:19:12 +02:00
Roderick van Domburg
ba4562c3c0
fix: update version only if version.workspace is not set 2025-08-24 16:17:37 +02:00
Felix Prillwitz
9d0e39f9c3
fix: fires the connect and disconnect again (#1548) 2025-08-24 12:27:53 +02:00
Roderick van Domburg
78ce118d32
fix: rustls-tls features to support certificate stores (#1542)
Add separate features for native system roots and Mozilla webpki roots.
Update documentation and build configs to reflect new options.
2025-08-20 11:31:13 +02:00
Roderick van Domburg
0a4969ffe2
feat: add configurable TLS backend selection with native-tls as default (#1541)
Add support for choosing between native-tls and rustls-tls backends
through feature flags, with native-tls as the default for maximum
platform compatibility.

Key changes:
- Add mutually exclusive native-tls and rustls-tls feature flags
- Use conditional compilation to select TLS implementation
- Configure rustls-tls with platform certificate verifier
- Refactor to workspace-based dependency management
- Update CI workflows with improved cross-compilation support
- Add comprehensive TLS backend documentation

The native-tls backend uses system TLS libraries (OpenSSL on Linux,
Secure Transport on macOS, SChannel on Windows) while rustls-tls
provides a pure Rust implementation with platform certificate stores.
2025-08-19 23:06:28 +02:00
waveplate
03bcdc6bda
OAuth: Allow non-loopback addresses (#1514) 2025-08-16 14:21:41 +02:00
Roderick van Domburg
9456a02afa
perf(playback): optimize audio normalization for stereo processing (#1485)
- Add pre-computed knee factor to eliminate division in sample loop
- Replace if-else chain with match pattern for cleaner branching
- Use direct references to reduce repeated array indexing
- Maintain existing stereo imaging via channel coupling

Addresses review comments from #1485 and incorporates optimizations
inspired by Rodio's limiter implementation for improved performance
in the stereo case.
2025-08-14 12:00:48 +02:00
Roderick van Domburg
19f635f90b
perf: inline functions in the audio hot path 2025-08-14 00:53:59 +02:00
Roderick van Domburg
9f37808851
docs: document move from native tls to ring and webpki 2025-08-14 00:34:18 +02:00
Roderick van Domburg
f59766af7e
perf(playback): optimize audio conversion with 16-bit dithering and bit shifts
Since Spotify audio is always 16-bit depth, optimize the conversion pipeline:
- Always dither at 16-bit level regardless of output format
- Preserve fractional precision until final rounding for better requantization
- Replace floating-point multiplication with compile-time bit shifts
- Add comprehensive inlining to eliminate function call overhead
- Specialize 24-bit clamping to remove runtime branching

This maintains proper dithering of the original 16-bit quantization artifacts
while maximizing performance through bit-shift operations and eliminating
unnecessary runtime calculations.
2025-08-14 00:31:59 +02:00
Roderick van Domburg
218eced556
style: format with style edition 2024 2025-08-13 23:09:59 +02:00
Roderick van Domburg
056d125cb2
refactor: move from native to webpki certs on all platforms 2025-08-13 19:05:52 +02:00
Roderick van Domburg
416bf00888
feat: improve Gaussian dither 2025-08-13 18:40:00 +02:00
Roderick van Domburg
fe7ca0d700
refactor: move from aws-lc to ring 2025-08-13 18:34:40 +02:00
Roderick van Domburg
c4766ceb99
fix: downgrade sysinfo for MSRV constraints 2025-08-13 17:22:37 +02:00
Roderick van Domburg
445f8b10a2
refactor: clean up Rodio fallback handling 2025-08-13 17:11:43 +02:00
Roderick van Domburg
648c9e30ea
ci: bump MSRV to 1.85 and update actions 2025-08-13 17:06:14 +02:00
Roderick van Domburg
1dcd041070
fix: install default crypto provider 2025-08-13 16:44:22 +02:00
Roderick van Domburg
6288e7e03c
refactor: update to Rust 1.85 and edition 2024, use inline log args
- Update MSRV to 1.85 and Rust edition to 2024.
- Refactor all logging macros to use inline argument formatting.
- Fix import order in main.rs and examples.
- Add async environment variable setter to main.rs as safe facade.
2025-08-13 16:19:39 +02:00
Roderick van Domburg
0aec38b07a
refactor: use Rust 2021 format strings for error and debug messages 2025-08-13 15:44:58 +02:00
Roderick van Domburg
fdd4a16fdc
feat: fallback to S16 format if unsupported in Rodio backend 2025-08-13 13:27:16 +02:00
Roderick van Domburg
ce1ab8ff3f
refactor: update dependencies and code for latest ecosystem changes
- Update many dependencies to latest versions across all crates
- Switch from `once_cell::OnceCell` to `std::sync::OnceLock` where appropriate
- Update OAuth to use stateful `reqwest` for HTTP requests
- Fix Rodio backend to honor the requested sample format
2025-08-13 13:19:48 +02:00
Roderick van Domburg
1d5c0d8451
docs: correct changelog entry for stream_from_cdn 2025-08-13 13:18:53 +02:00
Timon de Groot
ba3d501b08
spclient: Specify base url for metadata requests (#1528)
Fixes #1527
2025-08-11 13:31:36 +02:00
./lemon.sh
3a700f0020
fix: add fallback logic for CDN urls (#1524) 2025-08-08 16:32:20 +02:00
Felix Prillwitz
be37402421
Expose possible mixer opening errors (#1488)
* playback: handle errors when opening mixer

* chore: update CHANGELOG.md

* fix tests and typo
2025-07-14 17:39:33 +02:00
Felix Prillwitz
80c27ec476
fix: playback of uris by api request (#1509)
- pop page after usage
- become active when play is requested
2025-06-26 17:39:49 +02:00
Richard Peña B.
b2915ee2bf
fix(cdn_url): add support for verify query parameter (#1513)
- Updated `MaybeExpiringUrls` to handle `verify` query parameter.
- Extracted expiry timestamp from `verify` parameter if present.
- Adjusted test cases to include URLs with `verify` parameter.
- Updated assertions to account for the new URL format.

This change ensures compatibility with URLs containing the `verify`
query parameter, improving the flexibility of the CDN URL handling.

Solves #1512
2025-06-26 17:27:59 +02:00
Mads Marquart
2c425ebd06
Fix compiler error when objc2 is in dependency tree (#1503) 2025-06-09 12:34:54 +02:00
Felix Prillwitz
3686718ea2
Chore: fix clippy warnings for stable (1.87) and nightly (1.89) (#1504)
* chore: stable - fix clippy warnings

* chore: nightly - fix clippy warnings
2025-06-09 12:13:17 +02:00