Commit graph

125 commits

Author SHA1 Message Date
Guillaume Desmottes
1912065248
Cargo: use rust-version from workspace (#1375)
Make it easier to check and update.
2024-10-17 17:01:56 +02:00
Roderick van Domburg
e73a08d43a
Remove garbage toml-e files from last publish 2024-10-15 21:23:09 +02:00
Roderick van Domburg
a974a71cc4
Update Cargo.lock 2024-10-15 20:38:42 +02:00
Roderick van Domburg
84d28e887b
Update Cargo.lock 2024-10-15 20:34:15 +02:00
Nick Steel
b1180fb674
Remove unused deps (#1352) 2024-09-30 21:31:26 +02:00
yubiuser
22a8850fe9
Revert lint exception by setting minor version of protobuf (#1339) 2024-09-16 19:42:55 +02:00
yubiuser
dcd592bafb
Update MSRV to 1.74.0 and sysinfo to 0.31.3
Signed-off-by: yubiuser <github@yubiuser.dev>
2024-08-27 23:16:48 +02:00
Christian König
b0170d142b
Bump MSRV to 1.73
Signed-off-by: Christian König <ckoenig@posteo.de>
2024-06-10 18:50:38 +00:00
Christian König
ca035c9d17
Set MSRV in Cargo.toml files to 1.71
Signed-off-by: Christian König <ckoenig@posteo.de>
2024-05-11 19:03:06 +00:00
Roderick van Domburg
a5964c28fb
Merge pull request #1270 from yubiuser/fix/clippy
Fix clippy warnings
2024-05-11 12:34:05 +02:00
Guillaume Desmottes
a3b6e29520 lyrics: remove fullscreen_action
Looks like it's been removed from the JSON returned by Spotify.
2024-05-09 12:07:37 +02:00
Christian König
63e2490821
Fix redundant import checking on beta toolchain
Signed-off-by: Christian König <ckoenig@posteo.de>
2024-03-31 17:37:07 +00:00
Kees Hink
e6d8efeb2b Fix spelling: replace "it's" with "its" where a possessive is meant 2023-11-18 14:06:59 +01:00
Petr Tesarik
c600297f52 Fix newly reported clippy errors
- Use variables directly in format strings.
  As reported by clippy, variables can be used directly in the
  `format!` string.
- Use rewind() instead of seeking to 0.
- Remove superfluous & and ref.

Signed-off-by: Petr Tesarik <petr@tesarici.cz>
2023-01-27 23:15:51 +01:00
Lukáš Tyrychtr
3662302196
Update protobuf and related crates to 3.x (#1092) 2023-01-17 21:46:14 +01:00
Roderick van Domburg
7a01a3e442
Merge pull request #1089 from GeorgeHahn/microsecond-timestamps
Handle microsecond timestamps
2023-01-04 20:37:56 +01:00
George Hahn
ce4be71719 fix timestamp heuristic (year 2200+) 2023-01-03 22:39:07 -07:00
George Hahn
512c799266 Handle microsecond timestamps 2023-01-03 22:26:58 -07:00
Guillaume Desmottes
7f2cb684c9 fix clippy warnings 2023-01-03 00:36:35 +01:00
Guillaume Desmottes
f72048e5e1 metadata: add lyrics
Save users from doing all the parsing themselves.
2023-01-02 19:00:10 +01: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
eladyn
762f6d1a6f
strongly type ActivityPeriod (#1055)
switch fallibly to unsigned integers
2022-09-03 09:59:53 +02:00
Roderick van Domburg
80f0d3c59b
Pass by reference 2022-08-03 22:26:52 +02:00
Roderick van Domburg
70eb3f9d72
Add more HTTP endpoints and migrate playlist 2022-08-03 21:27:07 +02:00
Roderick van Domburg
922e927231
Merge pull request #1039 from roderickvd/rust-2021-edition
Migrate to Rust 2021
2022-08-03 20:04:31 +02:00
Daniel M
176a47f10f Return iterators instead of collected vecs
- Change the return type of metadata convenience iter functions to
  actual iterators instead of allocated collections
- The iterator item type is set to be a reference
2022-08-03 16:43:30 +02:00
Roderick van Domburg
2a79af1f0a
Migrate to Rust 2021 2022-08-02 21:42:38 +02:00
Daniel M
0c69126065 Rename from_repeated_* functions to impl_*
- `from_repeated_message` -> `impl_from_repeated`
- `from_repeated_enum` -> `impl_from_repeated_copy` since the enum
  references were just simply deref copied
- `try_from_repeated_message` -> `impl_try_from_repeated`
- Simplified the implementation of `from_repeated_enum`
2022-08-02 14:21:07 +02:00
Daniel M
a7fa0e2299 Implement DerefMut for wrapper types in metadata
- Change the `Deref` implementations for metadata wrapper types to use a
  new `impl_deref_wrapped` macro
- The macro implements `Deref` and `DerefMut`
2022-08-02 12:45:37 +02:00
dnlmlr
e5092c84fd
Implement additional metadata for Artist (#1036)
- Added `*-current()` functions to `Artist` to get the list of current
  versions / releases of each album
- This is useful since the `AlbumGroups` can contain multiple versions
  / releases of the same album
2022-08-02 11:43:48 +02:00
Roderick van Domburg
4980650b3d
Merge pull request #1018 from eladyn/more_metadata
Include more metadata in Track struct
2022-08-01 21:49:43 +02:00
sqozz
d09ee4206c Add minimum rust version 2022-08-01 15:14:17 +02:00
Roderick van Domburg
9f0185eb42
Merge branch 'dev' into more_metadata 2022-08-01 11:29:52 +02:00
Daniel M
e7348db17c Default for vec / hashmap wrappers in metadata
- Derive `Default` trait for the vec / hashmap wrapper types in
  `librespot-metadata`
- The wrapped types (`Vec` / `Hashmap`) implement Default, so the
  wrapper types should as well
2022-08-01 00:44:43 +02:00
eladyn
c0fc35fd18
Include more metadata in track struct
Based on changes from @capnfabs.
2022-07-31 11:56:14 +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
37794c5b78
Merge branch 'new-api' into dev 2022-07-29 23:39:06 +02:00
Roderick van Domburg
6537c441c3
Update Cargo.lock 2022-07-29 22:05:10 +02:00
eladyn
88f7cdbb44
Fix playlist metadata fields parsing (#1019)
Some fields were wrongly parsed as `SpotifyId`s, although they do not
always encode exactly 16 bytes in practice. Also, some optional fields
caused `[]` to be parsed as `SpotifyId`, which obviously failed as well.
2022-07-28 18:46:16 +02:00
Roderick van Domburg
05b9b13cf8
Merge branch 'dev' into new-api and update crates 2022-07-27 23:31:11 +02:00
Roderick van Domburg
88e64bd884
Update Cargo.lock 2022-05-23 21:43:16 +02:00
Roderick van Domburg
dff19377fa
Update version numbers to 0.4.0 2022-05-21 22:31:15 +02:00
Jason Gray
47f1362453
Port remove unsafe code and catch up with dev (#956) 2022-02-14 12:15:19 +01:00
Jason Gray
ceebb374f0
Remove unsafe code (#940)
Remove unsafe code
2022-01-23 19:02:04 +01:00
Roderick van Domburg
0de55c6183
Merge branch 'dev' into new-api 2022-01-14 23:42:18 +01:00
Roderick van Domburg
dbeeb0f991
Switch from chrono to time 2022-01-14 23:28:09 +01:00
Roderick van Domburg
59d00787c9
Update player crates and transitive dependencies 2022-01-09 16:04:53 +01:00
Roderick van Domburg
56f3c39fc6
Update hmac, pbkdf2, serde, serde_json, sha-1 2022-01-09 00:25:47 +01:00
Roderick van Domburg
5cc3040bd8
Update futures 2022-01-08 21:21:31 +01:00
Roderick van Domburg
d5a4be4aa1
Optimize fallback sample buffer size 2022-01-04 00:50:45 +01:00