Commit graph

17 commits

Author SHA1 Message Date
ashthespy c5fcdfd43c Upgrade protobuf to 2.0 and use protoc-rust to compile proto files 2018-10-03 15:06:44 +02: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
thekr1s b1f2a412ad fir rustfmt issues 2018-03-11 13:34:30 +01:00
thekr1s b3966b0e08 Add optional linear volume contol 2018-03-11 11:27:28 +01:00
Sasha Hilton 4fb8c71b0a Set SpotifyId methods to return Result 2018-02-25 03:04:07 +01:00
Sasha Hilton 685fb4e345
Merge pull request #156 from kingosticks/fix/update-context-uri
Include updating context_uri along with tracks and current index
2018-02-22 16:30:32 +01:00
Nick Steel a463633956 Also update repeat and shuffle status. 2018-02-17 15:59:04 +00:00
Nick Steel edabd042e4 Include updating context_uri along with tracks and current index.
This allows remote clients to show the green now-playing indication (#57).
2018-02-17 15:17:05 +00:00
awiouy 1cd7d4d145 connect: rewrite initial_state and CommandSender 2018-02-17 10:15:09 +01:00
awiouy 15909613e9 connect: dispose of protobuf_macros 2018-02-16 22:43:57 +01:00
awiouy 4c2b641cad core API: move spotify_id to lib.rs 2018-02-13 07:57:28 +01:00
Sasha Hilton 234958672f Implement [replace] for rust-crypto 2018-02-12 14:48:39 +01:00
awiouy b7c32e9d6d rustfmt: connect 2018-02-11 23:55:41 +01:00
awiouy d900134114 connect: discovery and spirc 2018-02-11 23:55:41 +01:00