Commit graph

215 commits

Author SHA1 Message Date
Paul Lietar
c700315b30 Fix a deadlock between SpircManager and Player.
The player was invoking its observers with the state locked, and the
SpircManager’s registered observer would try to lock it again.

Instead, the observers are invoked with a cloned state, and the SpircManager
avoids locking the state again.
2016-02-22 05:41:37 +00:00
Paul Lietar
95d1dfd774 Make recipient of SpircManager methods non-mut.
SpircManager has interior mutability using a Mutex. There’s no need to
make it’s methods take a mut reference.
2016-02-19 00:03:08 +00:00
Paul Lietar
72dc5025c0 Merge remote-tracking branch 'SimonPersson/master' 2016-02-18 23:41:22 +00:00
Simon Persson
3ccb2e2a10 Clean up before merging. 2016-02-19 00:02:41 +01:00
Paul Lietar
fd819845db Bump Cargo.lock to pickup new rust-protobuf-macros. 2016-02-18 03:46:12 +00:00
Simon Persson
c98ff9bd54 Make SpricManager cloneable to simplify for clients. 2016-02-17 20:53:25 +01:00
Simon Persson
906241b92e Export the current queue. 2016-02-17 20:53:25 +01:00
Simon Persson
8e0325c297 Add function for sending load comand. 2016-02-17 20:53:25 +01:00
Simon Persson
5e3404137f Add support for replacing tracks. Make a builder out of send_cmd. 2016-02-17 20:53:21 +01:00
Simon Persson
08cb429a0c Add functions for sending commands to other clients. 2016-02-17 20:45:01 +01:00
Simon Persson
677173d01b Export devices. 2016-02-17 20:45:01 +01:00
Simon Persson
5a19d38270 Refactor notify/notify_with_player_state. 2016-02-17 20:45:01 +01:00
Simon Persson
958d0c74d4 Maintain list of connected devices. 2016-02-17 20:44:54 +01:00
Paul Lietar
5a9b139a7f Intern returned C strings to avoid leaking them. 2016-02-05 21:11:55 +00:00
Paul Lietar
526c54702b Set the default volume to 100%, and add a fast path to volume control. 2016-02-05 20:54:47 +00:00
Paul Lietar
dfabbe5aa5 Add Blob based authentication 2016-01-27 10:44:15 +00:00
Paul Lietar
93640465dc Import librespot_protocol as protocol. 2016-01-27 10:40:00 +00:00
Paul Lietar
ae38e60518 Initial C API 2016-01-26 23:21:57 +00:00
Paul Lietar
327bb8477e Move Session::connect to authentication.rs 2016-01-26 23:02:17 +00:00
Paul Lietar
7a1db5f5a9 Encapsulate the session data and configuration. 2016-01-26 22:34:57 +00:00
Paul Lietar
9747bbc470 Add link API. 2016-01-26 22:25:13 +00:00
Paul Lietar
f822031ce3 Expose some more metadata. 2016-01-26 22:24:36 +00:00
Paul Lietar
8fed885595 Reorganize the spirc/player interaction.
Updates are now sent through a callback mechanism rather than a channel.
2016-01-20 15:52:50 +00:00
Paul Lietar
463ce97661 Remove the SpircDelegate abstraction 2016-01-20 14:11:49 +00:00
Paul Lietar
303121032d Store the volume as a u16 2016-01-20 13:55:36 +00:00
Paul Lietar
c5ed04f70d Merge remote-tracking branch 'realtwister/queue' 2016-01-20 13:51:35 +00:00
Paul Lietar
f3d56d0afe Update the README to reflect the new build dependencies. 2016-01-20 13:36:58 +00:00
Paul Lietar
cf2e9bb7c3 Make dns-sd opt in rather than opt out. 2016-01-20 13:35:02 +00:00
Paul Lietar
ac0d597e75 Ignore files which don’t have an id.
Fixes #42
2016-01-20 10:37:57 +00:00
Paul Lietar
2a7c9c312b Merge remote-tracking branch 'realtwister/master' 2016-01-18 21:47:32 +00:00
Paul Lietar
213c8d36ca Merge pull request #39 from psych0d0g/patch-2
tell users about dependencies
2016-01-16 13:08:27 +00:00
Erik
6f962089fd added queue functionality and created load_tracks 2016-01-16 02:15:24 +01:00
psych0d0g
4d9d1e799d tell users about dependencies
Sorry about the last pull, just revoke it
2016-01-16 01:21:27 +01:00
Erik
4310162b88 Fixed the multiple volume vars and the calculation is a bit simplified. 2016-01-15 01:12:08 +01:00
Paul Lietar
efee7dd8c5 Merge pull request #36 from psych0d0g/patch-1
bump rpassword version
2016-01-14 13:00:40 +00:00
psych0d0g
c5644f8b72 bump rpassword version
depend on 0.1.1 (added build dependencies on rpassword for the mips and mipsel architectures)
2016-01-14 13:58:04 +01:00
Erik
5788da8ddc Oops, left a debug still standing.. 2016-01-14 13:13:57 +01:00
Erik
17a5bb122a Added Volume in a fishy manner by modulating stream, could maybe be optimized. 2016-01-14 13:12:01 +01:00
Erik
3c8d709ff1 Added: Next and Previous track
Bug resolved: opening a list with "dissallowed tracks" is now possible
2016-01-14 04:27:34 +01:00
Paul Lietar
f316211ba3 travis: Don’t install external version of rust-protobuf anymore 2016-01-13 00:17:05 +00:00
Paul Lietar
7401fde7fc Update dependencies 2016-01-13 00:17:05 +00:00
Paul Lietar
3c29d744a9 Use the protobuf_build crate to simplify build process.
Removes external dependency on rust-protobuf, which prevents version
mismatch between the runtime and the compiler.
2016-01-13 00:16:02 +00:00
Paul Lietar
2eeb1c9817 Merge pull request #30 from herrernst/rename-binary
use a more descriptive binary name
2016-01-03 18:07:34 -07:00
Paul Lietar
f089f44359 Merge pull request #29 from herrernst/update-deps
update deps to compile (and work) also on arm devices
2016-01-03 18:06:41 -07:00
herrernst
2372447d23 change binary name
cargo can install directly from github, use
`cargo install --git https://github.com/plietar/librespot`
binary is put to ~/.cargo/bin/
2016-01-03 22:50:41 +01:00
herrernst
6fd736dde3 update deps to compile (and work) also on arm 2016-01-03 17:12:48 +01:00
Paul Lietar
fd6b805bfd Fix some clippy warnings. 2016-01-02 16:48:44 +01:00
Paul Lietar
90eeed3f80 rustfmt 2016-01-02 16:20:35 +01:00
Paul Lietar
5464647164 Ignore messages from unknown channels.
It occasionally happens that messages on a channel are received before
the subscription confirmation, which would cause a panic when looking
for the subscription.

Changed to simply ignore those.
2016-01-02 15:51:05 +01:00
Paul Lietar
cf57274f9c Add some details to zeroconf authentication 2016-01-02 14:49:51 +01:00