Henrik Friedrichsen
f8a0a31a01
fix: Handle librespot Seeked events
...
With librespot 0.5 the `PlayerEvent` behavior for track seeking seems to have
changed slightly and there is now a dedicated event. This broke seeking in
tracks.
With this change the dedicated event is processed and track position changes
should be picked up again.
2024-09-21 13:36:51 +02:00
Henrik Friedrichsen
ace23462f7
Migrate ncspot to librespot 0.5 breaking changes
...
- Set `client_id` via `SessionConfig`
- Use `TokenProvider` to obtain client token instead of custom Mercury call
- Other minor changes
2024-09-19 18:12:14 +02:00
Thomas Frans
8805464b1d
docs(worker): comment purpose of UI refresh task
...
The purpose of the manual UI refresh task isn't immediately clear. It
was explained in the commit message of the commit that introduced it.
2024-02-01 14:47:55 +01:00
Thomas Frans
cb96f46e51
chore: remove unnecessary asynchronous channel
...
* chore: remove unnecessary asynchronous channel
The channel does not need to be asynchronous as the receiving end is
used in a blocking manner and the sending end of a regular channel never
blocks.
* Fix broken merge
---------
Co-authored-by: Henrik Friedrichsen <henrik@affekt.org >
2024-01-06 12:00:05 +01:00
Thomas Frans
4eff37a3ed
style: deny clippy::multiple_inherent_impls lint
2024-01-06 11:37:50 +01:00
Thomas Frans
fe8f8e78ee
style(clippy): enforce clippy use_self lint
...
Clippy's `use_self` line ensures that `Self` is used instead of the real
name whenever possible. This makes searching easier and cleans up the
code a bit.
2023-09-27 22:06:54 +02:00
Henrik Friedrichsen
8222f1b2e4
Use variables directly inside format strings
...
Most systems should have an up to date Rust compiler by now, so we should be
fine.
2023-02-06 20:15:43 +01:00
Csaba Varró
f0a2cd79ff
Remove panics in the update_token flow ( #688 )
...
It caused a crash when the token failed to update
2022-01-01 21:43:12 +01:00
Henrik Friedrichsen
74b4e65b64
Refactor: move playable models to separate module
2021-11-08 20:44:21 +01:00
Henrik Friedrichsen
6a0ab196f2
Fix: stop player when Spotify worker thread dies
...
May help with #628
2021-10-18 22:08:45 +02:00
Henrik Friedrichsen
0ac789c36e
Don't panic when librespot event channel died
...
Terminate worker instead and attempt to open a new session
Should hopefully help with #536
2021-05-23 15:29:00 +02:00
Henrik Friedrichsen
01d227be79
Move up invalid session check
2021-05-23 15:28:09 +02:00
Henrik Friedrichsen
f6a895e160
Update to librespot 0.2.0 and Tokio v1
...
This also brings some much need async/.await rewrites
2021-05-07 22:51:32 +02:00
Henrik Friedrichsen
71d42d489e
Remove extern crate statements
...
https://doc.rust-lang.org/edition-guide/rust-2018/module-system/path-clarity.html
2021-05-07 22:51:32 +02:00
Henrik Friedrichsen
98e572169b
Implement track preloading
...
Will preload the next track close to the end of the currently playing
track. Should make playback of queued tracks a little smoother.
2021-04-11 15:54:32 +02:00
Henrik Friedrichsen
decf7c2aef
Improve synchronization of playback times
...
Take librespot timestamps instead of approximating them in ncspot.
2021-04-11 15:17:10 +02:00
Henrik Friedrichsen
cea5228245
(Re)store currently playing track + shuffle state
...
Solves #448
2021-04-09 19:10:34 +02:00
Henrik Friedrichsen
8483653cde
Refactor: extract Spotify Worker to separate file
2021-04-03 21:38:42 +02:00