Roderick van Domburg
3a2455d686
Merge branch 'dev' into log-volume-ctrl-optimisations
2021-05-26 20:50:42 +02:00
Roderick van Domburg
eca505c387
Improve volume controls
...
This is a squashed commit featuring the following:
Connect:
- Synchronize player volume with mixer volume on playback
- Fix step size on volume up/down events
- Remove no-op mixer started/stopped logic
Playback:
- Move from `connect` to `playback` crate
- Make cubic volume control available to all mixers with `--volume-ctrl cubic`
- Normalize volumes to `[0.0..1.0]` instead of `[0..65535]` for greater precision and performance (breaking)
- Add `--volume-range` option to set dB range and control `log` and `cubic` volume control curves
- Fix `log` and `cubic` volume controls to be mute at zero volume
Alsa mixer:
- Complete rewrite (breaking)
- Query card dB range for the `log` volume control unless specified otherwise
- Query dB range from Alsa softvol (previously only from hardware)
- Use `--device` name for `--mixer-card` unless specified otherwise
- Fix consistency for `cubic` between cards that report minimum volume as mute, and cards that report some dB value
- Fix `--volume-ctrl {linear|log}` to work as expected
- Removed `--mixer-linear-volume` option; use `--volume-ctrl linear` instead
2021-05-24 15:53:32 +02:00
johannesd3
9b6ba49026
Add "discovery" compat layer to "connect"
2021-05-19 21:09:38 +02:00
Johannesd3
ebea5397b9
Add librespot-discovery crate
2021-05-19 21:05:19 +02:00
johannesd3
041f084d7f
Fix warnings
2021-05-13 22:42:55 +02:00
johannesd3
1681574846
Bump hmac and pbkdf2
2021-05-01 10:53:14 +02:00
Sasha Hilton
9a75ca195e
Update spirc shuffle command for tokio migration
2021-05-01 01:48:42 +01:00
Sasha Hilton
617b3b72b7
Merge pull request #666 from jackvstrickland/dev
...
Add shuffle command and command handling
2021-05-01 01:20:03 +01:00
johannesd3
e688e7e886
Almost eliminate util module
2021-04-10 12:50:30 +02:00
johannesd3
7ddb1a20bb
Reuse librespot-core's Diffie Hellman in discovery
2021-04-09 22:39:47 +02:00
johannesd3
f5274f5ada
Merge branch 'dev' into tokio_migration
2021-04-09 10:39:06 +02:00
johannesd3
059b9029de
Remove redundant field names
2021-03-10 22:41:46 +01:00
johannesd3
5616004dbe
Fix many clippy lints
...
...and other small improvements
2021-03-10 22:41:44 +01:00
Jack Strickland
eb4dacbc59
Add shuffle command and command handling
2021-03-09 15:37:11 -06:00
Evan Cameron
6a33eb4efa
minor cleanup
2021-02-28 21:54:19 -05:00
Ash
56f1fb6dae
Merge pull request #595 from Johannesd3/const_versions
...
Replace version functions by constants
2021-02-26 10:47:44 +01:00
johannesd3
59c556635e
Clean up librespot-connect dependencies
2021-02-23 22:22:53 +01:00
johannesd3
d064ffc670
Use tokio channels and fix compilation errors
2021-02-23 22:22:53 +01:00
johannesd3
678d1777fd
Merge branch 'dev' into tokio_migration
2021-02-23 22:22:49 +01:00
Sasha Hilton
2060901c1e
Merge pull request #605 from flaktack/spirc-command-play-pause
...
Fix state toggling in SpircCommand::PlayPause
2021-02-21 23:30:48 +00:00
johannesd3
1c4d57c6da
Add shutdown to discovery server
2021-02-21 14:10:00 +01:00
johannesd3
2c81aaaf4e
Implement MercurySender not as sink
2021-02-21 14:10:00 +01:00
johannesd3
daf7ecd23a
Migrate librespot-connect to tokio 1.0
2021-02-21 14:09:31 +01:00
Zsombor Welker
392a12af92
Fix toggling in SpircCommand::PlayPause
...
Fix play/pause toggling in handle_play_pause() to correctly call handled_play()/handle_pause() based on the state.
2021-02-20 15:05:53 +01:00
johannesd3
34733baa75
Bump crypto crates
2021-02-13 19:10:57 +01:00
johannesd3
872fab62d8
Merge branch 'dev' into tokio_migration
2021-02-10 21:51:33 +01:00
johannesd3
09e506ed66
Replace version functions by constants
2021-02-09 19:42:56 +01:00
Sasha Hilton
deabf1f915
Minor updates to discovery and device types
2021-02-09 03:16:40 +00:00
johannesd3
fd1f049572
Removed volume struct
2021-01-25 10:52:06 +01:00
ashthespy
c69ccf77e9
[Connect] Migrate to tokio
0.1
2021-01-23 22:21:42 +00:00
ashthespy
931c8207fc
[Connect] Migrate to hyper ~v12
2021-01-23 22:21:42 +00:00
ashthespy
99be49acd2
Set volume control default to log, clean up stray debugs
2020-07-25 09:52:21 +02:00
Ash
f0b3b2c7e8
Refactor Volume control, allow for a fixed volume option ( #447 )
...
Refactored the old `--linear-volume` flag to a more generic `--volume-ctrl` flag that takes the options of `[linear, log, fixed]`. It defaults as previously to log.
2020-07-25 09:38:08 +02:00
Sasha Hilton
43ab7fcedb
Merge pull request #474 from ashthespy/skip_unplayable
...
Skip unplayable tracks instead of stopping
2020-07-24 03:05:57 +01:00
Sasha Hilton
cd944035de
Merge pull request #476 from PlusMinus0/fix-utf-username
...
Fix utf username
2020-07-22 17:22:33 +01:00
engineergreen
f83915e212
Issue #497 - Playing songs from android app ( #501 )
...
* Issue #497 - Playing songs from android app
Implement the fix suggested by @Johannesd3
* Fix formatting
2020-07-22 16:28:39 +02:00
ashthespy
16112d71b9
Search through full playlist for unplayable tracks
2020-05-28 16:18:41 +02:00
kaymes
e8ec5feb22
Don't send kPlayStatusLoading. ( #483 )
...
fixes #461
2020-05-27 19:51:56 +02:00
ashthespy
a28199f073
Tweak handling unavailables at start of playlists
2020-05-27 18:14:31 +02:00
ashthespy
1da80ce480
Handle unplayable track at start of playlist
2020-05-27 16:24:21 +02:00
ashthespy
01813cf7c9
Tweak unavailable track handling
...
Flag them as `NonPlayable` instead of removing them from the queue
2020-05-13 13:30:30 +02:00
ashthespy
9cacc2d09f
Fix regression in track cycling
2020-05-13 13:24:30 +02:00
ashthespy
172cb945c4
Merge branch 'dev' of https://github.com/librespot-org/librespot into skip_unplayable
2020-05-13 12:19:33 +02:00
ashthespy
14709b9f8d
Let spirc handle unavailable tracks
2020-05-13 11:49:26 +02:00
PlusMinus0
6f084d7ea5
Fix utf username.
2020-05-12 08:55:08 +02:00
ashthespy
902440925d
Handle unplayable tracks during prefetch
2020-05-10 14:31:43 +02:00
ashthespy
98e69ab0c4
Fetch context for Spotify Collection types as well
...
Liked songs for example
2020-05-09 16:40:57 +02:00
Sasha Hilton
670170bd23
Merge pull request #430 from kaymes/gapless_play
...
Gapless play and improved notifications
2020-02-27 02:14:13 +00:00
Konstantin Seiler
f3b13beb17
Fix typo.
2020-02-27 12:25:25 +11:00
Sasha Hilton
08c239319c
Merge pull request #386 from willstott101/cha_cha_shuffle
...
Ignore false shuffle/repeat when changing contexts to match Android behaviour (fixes : #266 )
2020-02-13 21:43:43 +01:00
Konstantin Seiler
3f111a9778
Suppress sending loading state to Spotify unless we actually need to load a track.
2020-02-07 21:21:11 +11:00
Konstantin Seiler
18d1181bf5
Clean up some code
...
Ensure the player events are emitted correctly.
Only call the external script on events we want to notify about.
Stop sink when loading to pause.
cargo fmt
2020-02-03 18:58:44 +11:00
Konstantin Seiler
981b76bace
Keep the sink open
...
Fix typo
2020-02-03 10:11:27 +11:00
Konstantin Seiler
6fed8d0413
Make preloading work.
2020-02-03 09:15:56 +11:00
Konstantin Seiler
9eef690a22
Some clean up
2020-02-02 11:08:46 +11:00
Konstantin Seiler
5784b4652c
Prepare for gapless play.
...
- change communication between player and spirc to use player events channel.
- enhance player events channel
- have spirc send loading messages to Spotify
- enable preloading of tracks in the player
2020-02-01 08:41:11 +11:00
Sasha Hilton
83140bea88
Merge pull request #427 from kaymes/connection-lost-crash
...
Gracefully handle lost network connections
2020-01-30 02:04:37 +01:00
Sasha Hilton
c9f1914fc8
Run cargo fmt
2020-01-28 19:19:18 +01:00
Sasha Hilton
6f7fd9f398
Merge pull request #426 from kaymes/empty-queue-crash
...
Prevent spirc from crashing when the queue is empty.
2020-01-24 03:05:07 +01:00
Sasha Hilton
e9c3357e41
Run cargo fmt
2020-01-24 02:26:16 +01:00
Sasha Hilton
cdcb919c08
Merge branch 'dev' into connection-lost-crash
2020-01-24 01:02:40 +01:00
Konstantin Seiler
a52092e094
Convert another panic to error handling.
...
Compatibility fix for Rust 1.33.
2020-01-24 10:12:16 +11:00
Konstantin Seiler
113bb92c9d
Prevent spirc from crashing when the queue is empty.
2020-01-23 19:26:47 +11:00
marcelbuesing
38d82f2dc2
Rerun rustfmt on full codebase
2020-01-17 18:47:30 +01:00
ashthespy
d26590afc5
Update to Rust 2018
...
- Fix deprecated Error::cause warnings and missing dyn
- Reset max_width
- Add rustfmt to Travis
- Run rustfmt on full codebase
with `cargo fmt --all`
- Add rustfmt to Travis
- Complete migration to edition 2018
- Replace try! shorthand
- Use explicit `dyn Trait`
2020-01-17 18:11:52 +01:00
Ash
2a1482c880
Merge pull request #421 from ashthespy/autoplay
...
Don't panic when no autoplay uri is obtained
2020-01-08 13:13:49 +01:00
ashthespy
6c6ba88590
Don't panic when no autoplay uri is obtained
...
For example from Liked Songs (`spotify:user:xxx:collection`)
2020-01-07 12:13:49 +01:00
Sasha Hilton
78bd0a1f7b
Merge pull request #394 from ashthespy/autoplay
...
Autoplay similar songs when your music ends
2019-12-12 19:04:48 +01:00
Sasha Hilton
d91bf573a4
Switch to libmdns for discovery
2019-11-06 16:39:31 +01:00
ashthespy
b3c9744b29
Add a autoplay
option flag
2019-11-05 20:34:43 +01:00
ashthespy
ba2639d1df
Autoplay similar songs when your music ends
2019-11-05 15:47:28 +01:00
ashthespy
ee3a756a6e
Fix borrow for Rust 1.32.0
2019-10-30 13:53:11 +01:00
ashthespy
508c7e2b26
Tweak track loading
2019-10-30 11:33:17 +01:00
ashthespy
b96405af82
Make SpotifyId
understand more URI formats
2019-10-30 11:33:17 +01:00
ashthespy
0cb7a3f7c8
WIP: Podcast support
2019-10-30 11:33:17 +01:00
Will Stott
8b8032634a
Fix shuffle and repeat when changing contexts to match Android behaviour
...
Seems strange that these fields return true in the has_ methods when as
far as I can tell it's impossible to remove the shuffle/repeat state in
the client without explicitly toggling them with their dedicated buttons
2019-10-19 12:42:23 +01:00
Nick Mavis
c19375c5ca
Fixed nightly conflict with
2019-09-16 15:00:09 -04:00
ashthespy
8d08425ef3
Refactor adding context tracks to state
2019-03-28 15:27:50 +01:00
Michael Edwards
9b4ede086a
Server time delta is a signed integer
...
Fixes #322
2019-03-26 21:45:23 +01:00
devgianlu
dc9b2de314
Fixed issue with time alignment
2019-03-24 07:15:14 -07:00
Michael Edwards
0bbca1d8bc
Use serde 1.0
2019-03-20 12:04:24 +01:00
Sasha Hilton
8b32e7a63e
Merge pull request #305 from ashthespy/dynamic-playlists
...
Support for Spotify Radio/Dynamic Playlists
2019-03-20 11:41:29 +01:00
Артём Павлов [Artyom Pavlov]
72589443c7
update Cargo.lock, use constant time equality check, remove block-modes
2019-03-16 18:30:10 +03:00
ashthespy
6870c76a43
Limit new context tracks added to frame
...
Keep only a fixed history of previous tracks to prior pushing new tracks
2019-03-16 16:18:38 +01:00
Artyom Pavlov
391b9c69c4
Merge branch 'master' into master
2019-03-15 16:32:54 +00:00
ashthespy
b0ee8ec74d
Tweak malformed gid handling
2019-03-15 08:26:58 +01:00
ashthespy
c0416972b6
Support Dailymixes and refactor dynamic playlists
2019-03-13 20:35:46 +01:00
Nick Steel
83bfdffcfe
discover: log the actual HTTP port that is used.
...
If the default port is used (i.e. no command line argument specified),
this logging incorrectly reports the server is running at port 0.
2019-03-13 18:45:43 +00:00
Nick Steel
4c1562f245
discover: do not panic on MAC mismatch. ( Fixes #289 )
...
The client's expected MAC will not match librespot's derived MAC
if the client used the wrong public key. This can happen if librespot
is restarted (and thus generated a new key) but the client is still
mistakingly using the old public key. When this happens we do not need
to panic, we can just abort the connection attempt.
2019-03-13 18:34:38 +00:00
Sasha Hilton
8978559d3a
Merge pull request #284 from tstenner/rand06
...
Update rand to 0.6
2019-03-10 18:09:08 +01:00
Sasha Hilton
0686fe545f
Update Spirc depreciated rand method
2019-03-10 17:48:19 +01:00
Åke Forslund
9b6b55ee7d
Update subscription uri
...
This fixes an issue loading new tracks probably caused by an update on spotify's side. The fix was suggested by @worleydl, all glory to them for figuring it out.
2019-02-22 14:09:01 +01:00
newpavlov
4bd0fc8b36
update aes-ctr to 0.3
2018-12-06 12:49:23 +03:00
ashthespy
96b432aa4c
Implement support for dynamic playlists (Radio)
2018-10-12 19:15:26 +02:00
newpavlov
1f1cd116e7
aes-ctr
2018-07-30 14:18:43 +03:00
newpavlov
e4677027d2
replace rust-crypto's hashes, HMAC and PBKDF2
2018-07-23 16:41:39 +03:00
Brice
d40c0f50db
Cache volume across restarts ( #220 )
...
* create Volume struct for use with Cache
* add "volume" file to Cache
* load cached volume on start, intial overrides cached overrides default
* amend volume_to_mixer function to cache the volume on every change
* pass cache to Spirc and SpircTask so volume_to_mixer has access
* rustfmt changes
* revert volume_to_mixer function and Spirc/SpircTask cache variable
* Volume implements Copy, pass by value instead of reference
* clamp volume to 100 if cached value exceeds limit
* convert Volume to u16 internally, use float and round to convert hex->dec
* convert initial_volume and ConnectConfig.volume to u16 as well
* add cache_volume function to SpircTask
* remove conversion to/from percentage on cached volume
* consolidate device.set_volume, mixer.set_volume, and caching
* streamline intial volume logic
2018-05-17 03:15:17 +02:00
Reinier Balt
2aea0e8fe6
do not panic on connection reset
2018-04-21 17:46:29 +02:00
Johan Anderholm
612978908f
Reformat according to new rustfmt rules
2018-03-24 08:45:43 +00:00
thekr1s
d6b82cd732
revert file mode to original mode
2018-03-14 23:19:49 +01:00