Commit graph

79 commits

Author SHA1 Message Date
Jarkko Lehtoranta
b1c6641723
Update changelog (#1176) 2023-07-19 14:57:44 +03:00
Jason Gray
4d6de15a97
Discovery retry (#1178)
When started at boot as a service discovery may fail due to it
trying to bind to interfaces before the network is actually up.
This could be prevented in systemd by starting the service after
network-online.target but it requires that a wait-online.service is
also enabled which is not always the case since a wait-online.service
can potentially hang the boot process until it times out in certain situations.
This allows for discovery to retry every 10 secs in the 1st 60 secs of uptime
before giving up thus papering over the issue and not holding up the boot process.
2023-06-30 09:30:14 +02:00
eladyn
4d402e690c
add session timeout handling (#1129) 2023-06-01 21:39:35 +02:00
yubiuser
c964102a34
Update dependencies sysinfo and RSA (#1164) 2023-05-14 21:27:17 +02:00
AeRo
31d18f7e30
Respect disabled normalisation with maximum volume (#1159) 2023-05-06 09:47:08 +02:00
George Hahn
e8f93c44fd Fix NamedSpotifyId::to_uri 2023-01-28 02:56:09 -07:00
Roderick van Domburg
7a01a3e442
Merge pull request #1089 from GeorgeHahn/microsecond-timestamps
Handle microsecond timestamps
2023-01-04 20:37:56 +01:00
Roderick van Domburg
61ae66b998
Merge pull request #1088 from GeorgeHahn/support-named-playlist-ids
Parse playlist URIs with named IDs
2023-01-04 20:36:16 +01:00
George Hahn
c2c31247b5 changelog 2023-01-03 22:28:36 -07:00
George Hahn
7a259ccc4b Parse named ID URIs 2023-01-02 16:27:40 -07:00
Guillaume Desmottes
f72048e5e1 metadata: add lyrics
Save users from doing all the parsing themselves.
2023-01-02 19:00:10 +01:00
Oliver Cooper
edf646d4bb
Add activate and load functions to Spirc (#1075) 2022-12-03 12:25:27 +01:00
ealasu
5cfdb8c9dd Parse local file IDs 2022-12-02 17:24:02 -07:00
setime
bf7cbbaadd
Add an option to specify IPs that zeroconf will bind to (#1071)
* added an option to specify ip addresses to which mDNS should bind (ignored by `DNS-SD`)
* changed command line option to `zeroconf-interface` to be consistent with `zeroconf-port`
use builder pattern to DRY up the code
used macro to print warning message
* fixing register error
* renamed `bind_ip` variables to match the option to `zeroconf_ip`, to be more consistent
* Changed user help
Modified comments
Added block for condition to clean the code
Added new modification to the change log

Co-authored-by: setime <timeframe1@gmx.de>
2022-11-25 09:57:14 +01:00
Roderick van Domburg
bfb7d5689c
Retrieve autoplay contexts over HTTPS and fix repeat/prev/next
Repeat, previous and next used to start playback regardless of
the actual playback state. They now start playback only if we
were already playing.
2022-09-30 21:36:20 +02:00
Roderick van Domburg
6dc7a11b09
Re-introduce autoplay command-line option as an override 2022-09-28 22:59:03 +02:00
Roderick van Domburg
cc1fb5a406
Update changelog 2022-09-28 22:17:43 +02:00
JasonLG1979
8545f361c4 Major Events Overhaul
Special thanks to @eladyn for all of their help and suggestions.

* Add all player events to `player_event_handler.rs`

* Move event handler code to `player_event_handler.rs`

* Add session events

* Clean up and de-noise events and event firing

* Added metadata support via a TrackChanged event

* Add `event_handler_example.py`

* Handle invalid track start positions by just starting the track from the beginning

* Add repeat support to `spirc.rs`

* Add `disconnect`, `set_position_ms` and `set_volume` to `spirc.rs`

* Set `PlayStatus` to the correct value when Player is loading to avoid blanking out the controls when `self.play_status` is `LoadingPlay` or `LoadingPause` in `spirc.rs`

* Handle attempts to play local files better by basically ignoring attempts to load them in `handle_remote_update` in `spirc.rs`

* Add an event worker thread that runs async to the main thread(s) but sync to itself to prevent potential data races for event consumers.

* Get rid of (probably harmless) `.unwrap()` in `main.rs`

* Ensure that events are emited in a logical order and at logical times

* Handle invalid and disappearing devices better

* Ignore SpircCommands unless we're active with the exception of ShutDown
2022-09-17 16:21:10 -05:00
Roderick van Domburg
e9f3b6d290
Catch-up changelog 2022-07-31 00:04:08 +02:00
Roderick van Domburg
786f8832d1
Update version numbers to 0.5.0-dev 2022-07-30 22:28:12 +02:00
Roderick van Domburg
38bebc242a
Prepare for 0.4.2 release 2022-07-29 21:34:01 +02:00
Roderick van Domburg
87ea69b457
Blacklist ap-gue1.spotify.com access point 2022-07-29 21:30:27 +02:00
Roderick van Domburg
7bd9186e94
Blacklist ap-gew4 access point (#1026) 2022-07-28 18:51:49 +02:00
JasonLG1979
582fdebadd Update Changelog
This should update the changelog for my last 3 PR's.
2022-07-20 20:27:45 -05:00
JasonLG1979
e4deb5ddcd Fix fixed volume with hardware mixer.
fixes https://github.com/librespot-org/librespot/issues/1008
2022-06-09 16:34:42 -05:00
Roderick van Domburg
fc1e74574a
Update changelog 2022-05-23 22:21:56 +02:00
JasonLG1979
79b92bbe7a Update changelog and such 2022-05-23 13:42:38 -05:00
Roderick van Domburg
5568c70cd1
Prepare for new developments 2022-05-21 22:52:39 +02:00
Roderick van Domburg
310b3cca81
Prepare for 0.4.0 release 2022-05-21 22:14:18 +02:00
Sean McNamara
3d298768b3
Backport #964 GStreamer backend cleanup (#979) 2022-05-21 20:55:55 +02:00
Louis Seubert
6c2491b9a3
adding callback for reusable credentials (#983)
This allows more control over how the credentials are saved to the cache
2022-05-20 12:53:44 +02:00
Roderick van Domburg
be9a393b2a
Merge pull request #997 from WhyNotHugo/avoid-unwrap-disco
Avoid crash when Avahi is not available
2022-05-20 11:19:36 +02:00
Hugo Osvaldo Barrera
4fd7ac24ce Bump MSRV to 1.53
See: https://github.com/librespot-org/librespot/pull/997
2022-05-20 08:57:21 +02:00
Hugo Osvaldo Barrera
c4af90f5fe Avoid crashing when Avahi is not available
When librespot is built with Avahi turned on, it will crash if Avahi is
later not available at runtime.

This change avoids it crashing hard when Avahi is not available;
librespot will merely warn of the issue.

This affects some distribution packages too, where the maintainer might
prefer leaving Avahi support enabled, but many setups don't (or can't)
run Avahi.

Co-authored-by: Nick Steel <nick@nsteel.co.uk>
2022-05-20 08:39:20 +02:00
JasonLG1979
e0e23c9167 Use the librespot name arg for the app name in the PulseAudio backend
This sets the name displayed by PulseAudio to Librespot - Instance Name if a name is given otherwise Librespot (the default name).

This also sets the correct "role" as per the docs:

https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/Developer/Clients/ApplicationProperties/

PA_PROP_MEDIA_ROLE

"This is a property of the actual streamed data, not so much the application"

Roles are used for policies, things like automatically muting a music player when a call comes in and whatnot.

For bonus points this also sets PULSE_PROP_application.icon_name to audio-x-generic so that we get a nice icon in the PulseAudio settings by our name instead of a missing icon placeholder.
2022-03-19 15:09:26 -05:00
JasonLG1979
d54f3982a0 update changelog 2022-02-01 17:48:13 -06:00
Roderick van Domburg
c8971dce63
Fix Alsa softvol linear mapping (#950)
Use `--volume-range` overrides
2022-01-27 18:39:28 +01:00
Jason Gray
03e71f6e0a
simplify get_factor (#942)
Simplify `get_factor`
2022-01-27 07:40:59 +01:00
Jason Gray
ceebb374f0
Remove unsafe code (#940)
Remove unsafe code
2022-01-23 19:02:04 +01:00
Roderick van Domburg
72af0d2014
New dynamic limiter for very wide dynamic ranges (#935)
New dynamic limiter for very wide dynamic ranges
2022-01-14 23:31:29 +01:00
Roderick van Domburg
1e54913523
Fix --device argument to various backends (#938)
Fix `--device` argument to various backends
2022-01-14 08:20:29 +01:00
Guillaume Desmottes
f09be4850e Sink: pass ownership of the packet on write()
Prevent a copy if the implementation needs to keep the data around.
2021-12-31 13:46:35 +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
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
Tom Vincent
bbd575ed23
Harden systemd service, update restart policy (#888) 2021-11-26 19:49:50 +01:00
JasonLG1979
c006a23644 Improve --device ? functionality for the alsa backend
This makes `--device ?` only show compatible devices (ones that support 2 ch 44.1 Interleaved) and it shows what `librespot` format(s) they support.

This should be more useful to users as the info maps directly to `librespot`'s `--device` and `--format` options.
2021-11-20 13:51:24 -06:00
JasonLG1979
0e9fdbe6b4 Refactor main.rs
* Don't panic when parsing options. Instead list valid values and exit.
* Get rid of needless .expect in playback/src/audio_backend/mod.rs.
* Enforce reasonable ranges for option values (breaking).
* Don't evaluate options that would otherwise have no effect.
* Add pub const MIXERS to mixer/mod.rs very similar to the audio_backend's implementation. (non-breaking though)
* Use different option descriptions and error messages based on what backends are enabled at build time.
* Add a -q, --quiet option that changed the logging level to warn.
* Add a short name for every flag and option.
* Note removed options.
* Other misc cleanups.
2021-11-17 15:31:16 -06:00
JasonLG1979
24e4d2b636 Prevent librespot from becoming a zombie
Prevent hang when discovery is disabled and there are no credentials or when bad credentials are given.
2021-10-28 09:13:46 -05:00
JasonLG1979
9152ca8159 Update changelog 2021-10-26 22:20:24 -05:00
Roderick van Domburg
9d19841c0f
Prepare for 0.3.1 release 2021-10-24 20:07:11 +02:00