2017-08-03 18:58:44 +00:00
|
|
|
[package]
|
|
|
|
name = "librespot-core"
|
2024-10-31 22:14:13 +00:00
|
|
|
version = "0.6.0-dev"
|
2024-10-17 15:01:56 +00:00
|
|
|
rust-version.workspace = true
|
2017-08-03 18:58:44 +00:00
|
|
|
authors = ["Paul Lietar <paul@lietar.net>"]
|
|
|
|
build = "build.rs"
|
2020-11-26 19:31:51 +00:00
|
|
|
description = "The core functionality provided by librespot"
|
|
|
|
license = "MIT"
|
2020-11-26 19:30:37 +00:00
|
|
|
repository = "https://github.com/librespot-org/librespot"
|
2022-08-02 19:42:38 +00:00
|
|
|
edition = "2021"
|
2017-08-03 18:58:44 +00:00
|
|
|
|
2024-09-13 05:35:55 +00:00
|
|
|
[dependencies.librespot-oauth]
|
|
|
|
path = "../oauth"
|
2024-10-31 22:14:13 +00:00
|
|
|
version = "0.6.0-dev"
|
2024-09-13 05:35:55 +00:00
|
|
|
|
2017-08-03 18:58:44 +00:00
|
|
|
[dependencies.librespot-protocol]
|
|
|
|
path = "../protocol"
|
2024-10-31 22:14:13 +00:00
|
|
|
version = "0.6.0-dev"
|
2017-08-03 18:58:44 +00:00
|
|
|
|
|
|
|
[dependencies]
|
2022-07-27 21:31:11 +00:00
|
|
|
aes = "0.8"
|
2024-06-10 16:31:01 +00:00
|
|
|
base64 = "0.22"
|
2021-01-21 20:49:39 +00:00
|
|
|
byteorder = "1.4"
|
2021-11-26 22:21:27 +00:00
|
|
|
bytes = "1"
|
2021-03-18 16:51:50 +00:00
|
|
|
form_urlencoded = "1.0"
|
2022-01-08 20:21:31 +00:00
|
|
|
futures-core = "0.3"
|
|
|
|
futures-util = { version = "0.3", features = ["alloc", "bilock", "sink", "unstable"] }
|
2023-08-06 09:13:32 +00:00
|
|
|
governor = { version = "0.6", default-features = false, features = ["std", "jitter"] }
|
2022-01-08 23:25:47 +00:00
|
|
|
hmac = "0.12"
|
2022-07-27 21:31:11 +00:00
|
|
|
httparse = "1.7"
|
2024-06-06 07:38:46 +00:00
|
|
|
http = "1.0"
|
|
|
|
hyper = { version = "1.3", features = ["http1", "http2"] }
|
|
|
|
hyper-util = { version = "0.1", features = ["client"] }
|
|
|
|
http-body-util = "0.1.1"
|
2019-07-08 08:08:32 +00:00
|
|
|
log = "0.4"
|
2022-08-29 21:09:51 +00:00
|
|
|
nonzero_ext = "0.3"
|
2021-03-18 16:51:50 +00:00
|
|
|
num-bigint = { version = "0.4", features = ["rand"] }
|
2023-08-06 09:25:26 +00:00
|
|
|
num-derive = "0.4"
|
2019-07-08 08:08:32 +00:00
|
|
|
num-integer = "0.1"
|
|
|
|
num-traits = "0.2"
|
2022-07-27 21:31:11 +00:00
|
|
|
once_cell = "1"
|
|
|
|
parking_lot = { version = "0.12", features = ["deadlock_detection"] }
|
2023-04-11 18:33:45 +00:00
|
|
|
pbkdf2 = { version = "0.12", default-features = false, features = ["hmac"] }
|
2024-10-15 11:36:17 +00:00
|
|
|
pin-project-lite = "0.2"
|
2024-06-10 17:51:44 +00:00
|
|
|
priority-queue = "2.0"
|
2024-09-16 17:42:55 +00:00
|
|
|
protobuf = "3.5"
|
2024-08-28 11:42:13 +00:00
|
|
|
quick-xml = { version = "0.36.1", features = ["serialize"] }
|
2021-02-10 21:54:35 +00:00
|
|
|
rand = "0.8"
|
2023-05-14 19:27:17 +00:00
|
|
|
rsa = "0.9.2"
|
2021-02-10 21:54:35 +00:00
|
|
|
serde = { version = "1.0", features = ["derive"] }
|
2019-03-15 14:50:15 +00:00
|
|
|
serde_json = "1.0"
|
2023-04-11 20:21:37 +00:00
|
|
|
sha1 = { version = "0.10", features = ["oid"] }
|
2022-01-08 23:25:47 +00:00
|
|
|
shannon = "0.2"
|
2024-08-27 21:16:48 +00:00
|
|
|
sysinfo = { version = "0.31.3", default-features = false, features = ["system"] }
|
2021-12-16 21:42:37 +00:00
|
|
|
thiserror = "1.0"
|
2022-09-01 20:35:03 +00:00
|
|
|
time = { version = "0.3", features = ["formatting", "parsing"] }
|
2022-01-08 22:28:46 +00:00
|
|
|
tokio = { version = "1", features = ["io-util", "macros", "net", "parking_lot", "rt", "sync", "time"] }
|
|
|
|
tokio-stream = "0.1"
|
2022-05-23 13:00:35 +00:00
|
|
|
tokio-util = { version = "0.7", features = ["codec"] }
|
2022-01-09 00:03:47 +00:00
|
|
|
url = "2"
|
2022-08-25 23:51:00 +00:00
|
|
|
uuid = { version = "1", default-features = false, features = ["fast-rng", "v4"] }
|
2023-12-01 16:38:59 +00:00
|
|
|
data-encoding = "2.5"
|
Spirc: Replace Mecury with Dealer (#1356)
This was a huge effort by photovoltex@gmail.com with help from the community.
Over 140 commits were squashed. Below, their commit messages are kept unchanged.
---
* dealer wrapper for ease of use
* improve sending protobuf requests
* replace connect config with connect_state config
* start integrating dealer into spirc
* payload handling, gzip support
* put connect state consistent
* formatting
* request payload handling, gzip support
* expose dealer::protocol, move request in own file
* integrate handle of connect-state commands
* spirc: remove ident field
* transfer playing state better
* spirc: remove remote_update stream
* spirc: replace command sender with connect state update
* spirc: remove device state and remaining unused methods
* spirc: remove mercury sender
* add repeat track state
* ConnectState: add methods to replace state in spirc
* spirc: move context into connect_state, update load and next
* spirc: remove state, adjust remaining methods
* spirc: handle more dealer request commands
* revert rustfmt.toml
* spirc: impl shuffle
- impl shuffle again
- extracted fill up of next tracks in own method
- moved queue revision update into next track fill up
- removed unused method `set_playing_track_index`
- added option to specify index when resetting the playback context
- reshuffle after repeat context
* spirc: handle device became inactive
* dealer: adjust payload handling
* spirc: better set volume handling
* dealer: box PlayCommand (clippy warning)
* dealer: always respect queued tracks
* spirc: update duration of track
* ConnectState: update more restrictions
* cleanup
* spirc: handle queue requests
* spirc: skip next with track
* proto: exclude spirc.proto
- move "deserialize_with" functions into own file
- replace TrackRef with ProvidedTrack
* spirc: stabilize transfer/context handling
* core: cleanup some remains
* connect: improvements to code structure and performance
- use VecDeque for next and prev tracks
* connect: delayed volume update
* connect: move context resolve into own function
* connect: load context asynchronous
* connect: handle reconnect
- might currently steal the active devices playback
* connect: some fixes and adjustments
- fix wrong offset when transferring playback
- fix missing displayed context in web-player
- remove access_token from log
- send correct state reason when updating volume
- queue track correctly
- fix wrong assumption for skip_to
* connect: replace error case with option
* connect: use own context state
* connect: more stabilising
- handle SkipTo having no Index
- handle no transferred restrictions
- handle no transferred index
- update state before shutdown, for smoother reacquiring
* connect: working autoplay
* connect: handle repeat context/track
* connect: some quick fixes
- found self-named uid in collection after reconnecting
* connect: handle add_to_queue via set_queue
* fix clippy warnings
* fix check errors, fix/update example
* fix 1.75 specific error
* connect: position update improvements
* connect: handle unavailable
* connect: fix incorrect status handling for desktop and mobile
* core: fix dealer reconnect
- actually acquire new token
- use login5 token retrieval
* connect: split state into multiple files
* connect: encapsulate provider logic
* connect: remove public access to next and prev tracks
* connect: remove public access to player
* connect: move state only commands into own file
* connect: improve logging
* connect: handle transferred queue again
* connect: fix all-features specific error
* connect: extract transfer handling into own file
* connect: remove old context model
* connect: handle more transfer cases correctly
* connect: do auth_token pre-acquiring earlier
* connect: handle play with skip_to by uid
* connect: simplified cluster update log
* core/connect: add remaining set value commands
* connect: position update workaround/fix
* connect: some queue cleanups
* connect: add uid to queue
* connect: duration as volume delay const
* connect: some adjustments and todo cleanups
- send volume update before general update
- simplify queue revision to use the track uri
- argument why copying the prev/next tracks is fine
* connect: handle shuffle from set_options
* connect: handle context update
* connect: move other structs into model.rs
* connect: reduce SpircCommand visibility
* connect: fix visibility of model
* connect: fix: shuffle on startup isn't applied
* connect: prevent loading a context with no tracks
* connect: use the first page of a context
* connect: improve context resolving
- support multiple pages
- support page_url of context
- handle single track
* connect: prevent integer underflow
* connect: rename method for better clarity
* connect: handle mutate and update messages
* connect: fix 1.75 problems
* connect: fill, instead of replace next page
* connect: reduce context update to single method
* connect: remove unused SpircError, handle local files
* connect: reduce nesting, adjust initial transfer handling
* connect: don't update volume initially
* core: disable trace logging of handled mercury responses
* core/connect: prevent takeover from other clients, handle session-update
* connect: add queue-uid for set_queue command
* connect: adjust fields for PlayCommand
* connect: preserve context position after update_context
* connect: unify metadata modification
- only handle `is_queued` `true` items for queue
* connect: polish request command handling
- reply to all request endpoints
- adjust some naming
- add some docs
* connect: add uid to tracks without
* connect: simpler update of current index
* core/connect: update log msg, fix wrong behavior
- handle became inactive separately
- remove duplicate stop
- adjust docs for websocket request
* core: add option to request without metrics and salt
* core/context: adjust context requests and update
- search should now return the expected context
- removed workaround for single track playback
- move local playback check into update_context
- check track uri for invalid characters
- early return with `?`
* connect: handle possible search context uri
* connect: remove logout support
- handle logout command
- disable support for logout
- add todos for logout
* connect: adjust detailed tracks/context handling
- always allow next
- handle no prev track available
- separate active and fill up context
* connect: adjust context resolve handling, again
* connect: add autoplay metadata to tracks
- transfer into autoplay again
* core/connect: cleanup session after spirc stops
* update CHANGELOG.md
* playback: fix clippy warnings
* connect: adjust metadata
- unify naming
- move more metadata infos into metadata.rs
* connect: add delimiter between context and autoplay playback
* connect: stop and resume correctly
* connect: adjust context resolving
- improved certain logging parts
- preload autoplay when autoplay attribute mutates
- fix transfer context uri
- fix typo
- handle empty strings for resolve uri
- fix unexpected stop of playback
* connect: ignore failure during stop
* connect: revert resolve_uri changes
* connect: correct context reset
* connect: reduce boiler code
* connect: fix some incorrect states
- uid getting replaced by empty value
- shuffle/repeat clearing autoplay context
- fill_up updating and using incorrect index
* core: adjust incorrect separator
* connect: move `add_to_queue` and `mark_unavailable` into tracks.rs
* connect: refactor - directly modify PutStateRequest
- replace `next_tracks`, `prev_tracks`, `player` and `device` with `request`
- provide helper methods for the removed fields
* connect: adjust handling of context metadata/restrictions
* connect: fix incorrect context states
* connect: become inactive when no cluster is reported
* update CHANGELOG.md
* core/playback: preemptively fix clippy warnings
* connect: minor adjustment to session changed
* connect: change return type changing active context
* connect: handle unavailable contexts
* connect: fix previous restrictions blocking load with shuffle
* connect: update comments and logging
* core/connect: reduce some more duplicate code
* more docs around the dealer
2024-12-10 19:36:09 +00:00
|
|
|
flate2 = "1.0.33"
|
|
|
|
protobuf-json-mapping = "3.5"
|
2017-08-03 18:58:44 +00:00
|
|
|
|
2024-12-05 13:11:40 +00:00
|
|
|
# Eventually, this should use rustls-platform-verifier to unify the platform-specific dependencies
|
|
|
|
# but currently, hyper-proxy2 and tokio-tungstenite do not support it.
|
|
|
|
[target.'cfg(any(target_os = "windows", target_os = "macos", target_os = "linux"))'.dependencies]
|
|
|
|
hyper-proxy2 = { version = "0.1", default-features = false, features = ["rustls"] }
|
|
|
|
hyper-rustls = { version = "0.27.2", default-features = false, features = ["aws-lc-rs", "http1", "logging", "tls12", "native-tokio", "http2"] }
|
|
|
|
tokio-tungstenite = { version = "0.24", default-features = false, features = ["rustls-tls-native-roots"] }
|
|
|
|
|
|
|
|
[target.'cfg(not(any(target_os = "windows", target_os = "macos", target_os = "linux")))'.dependencies]
|
|
|
|
hyper-proxy2 = { version = "0.1", default-features = false, features = ["rustls-webpki"] }
|
|
|
|
hyper-rustls = { version = "0.27.2", default-features = false, features = ["aws-lc-rs", "http1", "logging", "tls12", "webpki-tokio", "http2"] }
|
|
|
|
tokio-tungstenite = { version = "0.24", default-features = false, features = ["rustls-tls-webpki-roots"] }
|
|
|
|
|
2017-08-03 18:58:44 +00:00
|
|
|
[build-dependencies]
|
2021-02-10 21:54:35 +00:00
|
|
|
rand = "0.8"
|
2024-08-28 11:13:29 +00:00
|
|
|
vergen-gitcl = { version = "1.0.0", default-features = false, features = ["build"] }
|
2021-01-22 21:32:45 +00:00
|
|
|
|
|
|
|
[dev-dependencies]
|
2022-01-09 00:03:47 +00:00
|
|
|
tokio = { version = "1", features = ["macros", "parking_lot"] }
|