Commit graph

307 commits

Author SHA1 Message Date
William R. Fraser 9fa138a116 implement using tokio-process instead 2018-10-16 02:34:56 -07:00
William R. Fraser eaac599ce3 reap the exit statuses from 'onevent' child processes 2018-10-16 00:24:33 -07:00
Harold 4fb3d5f271 Add ap-port option to specify preferred port 2018-07-03 13:09:22 +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 deb240c02f reverse #212 since it does not address the real problem (#213) 2018-05-01 21:39:49 +02:00
Reinier Balt 6a4e9e8bec return from Main loop on Ctrl-C/shutdown 2018-04-30 14:22:45 +02:00
Johan Anderholm 3a14e9a6be Validate proxy urls better.
Use the url crate to handle proxies to make sure they conform to a
proper format.
2018-03-24 08:45:43 +00:00
Johan Anderholm 3bdc5e0073 Add support for http proxy
Currently only http proxy (no https) is supported.
2018-03-24 08:45:43 +00: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 237ef1e4f9 Format according to rustfmt 2018-02-26 02:50:41 +01:00
Sasha Hilton 084646e21b Use prompt for password in main.rs 2018-02-25 05:40:00 +01:00
Sasha Hilton bde157fad7
Merge branch 'master' into events-on-prev-next 2018-02-24 20:16:28 +01:00
Sasha Hilton eed2bb6938
Merge pull request #162 from librespot-org/normalisation
Add volume normalisation support
2018-02-24 18:54:03 +01:00
Anton Voyl 58ea1baa98 Issue 130 (#164)
* Core API: device_id

* Core API: u128
2018-02-24 16:34:04 +01:00
Sasha Hilton f8db550e5e Add volume normalisation support 2018-02-23 20:08:20 +01:00
Simon Persson 23d3c1593f Just spawn event handlers, don't wait for exit code. 2018-02-20 23:17:06 +01:00
Simon Persson 93af49aadf Send player event messages over futures aware channel. 2018-02-20 23:12:29 +01:00
Simon Persson 2eb4aa61d3 Use single program on events, and pass events in envars. 2018-02-20 22:45:14 +01:00
Simon Persson 1b943d069f Move PlayerEvent into player. 2018-02-20 21:57:42 +01:00
Simon Persson b0ee03112f First attempt at a better playback event system. 2018-02-16 00:16:38 +01:00
Sasha Hilton 17d39dffa9 Make backtrace var conditional 2018-02-13 16:46:10 +01:00
Sasha Hilton 67dabcdd8e Enable backtrace on all builds 2018-02-13 14:02:37 +01:00
Sasha Hilton 60996d108e Update device usage instructions 2018-02-13 02:35:59 +01:00
Sasha Hilton 90ae9d713d Fix conflicts from PR #143 2018-02-12 01:12:02 +01:00
awiouy d900134114 connect: discovery and spirc 2018-02-11 23:55:41 +01:00
awiouy 191caca518 core API: move Bitrate and PlayerConfig from core to playback 2018-02-11 23:55:41 +01:00
Michael Herger 5ed4639cca Remove the -z as an alias for the --zeroconf-port parameter 2018-02-11 06:32:07 +01:00
Michael Herger 12487966b2 Somewhat uniform coding style might help myself to better understand Rust :-) 2018-02-11 06:32:07 +01:00
Sasha Hilton f3bb85c33a
Merge pull request #137 from awiouy/core_API
core API review changes.
2018-02-10 23:14:41 +01:00
awiouy 77882836ce core API: move now_ms to spirc.rs 2018-02-10 17:58:15 +01:00
Nick Steel d05fa10067 Improved next/prev handling for queued tracks.
1) A queued track is removed once it has become the current track.
   Note that the track doesn't need to actually play i.e. it could
   have been immediately skipped over with 'next()'. This is
   implemented in 'consume_queued_track()'.

2) Queued tracks are always positioned immediately after the current
   track. 1) ensures this is true for 'next()' but 'prev()' requires
   all the queued tracks are actually moved for this to remain the
   case.

Also fixed the case where 'prev()' on the first track would incorrectly
wrap back around to the last track even when repeat was disabled. The
correct behaviour is to remain on the first track and just seek to the
start.

For example, with the following tracks and repeat enabled:

TrackA, TrackB, TrackC-Q, TrackD-Q, TrackE
        ^^^^^^

Here, the result of 'prev' changes the current track from TrackB to
TrackA and the queued tracks (TrackC, TrackD) move to the position
immediately after TrackA:

TrackA, TrackC-Q, TrackD-Q, TrackB, TrackE
^^^^^^

Calling 'prev' again results in the current track wrapping back around
to TrackE and the queued tracks moving after that same track:

TrackA, TrackB, TrackE, TrackC-Q, TrackD-Q
                ^^^^^^
2018-02-10 15:17:30 +00:00
Sasha Hilton 1fb65354b0 Move audio backends into seperate crate 2018-02-09 02:05:50 +01:00
awiouy e3516ebd9b Move discovery to its own module. 2018-02-08 04:03:53 +01:00
Sasha Hilton 7ead896ae7
Merge pull request #122 from librespot-org/keymaster
Move keymaster to core
2018-02-07 17:50:45 +01:00
Sasha Hilton 53fab4dc86
Merge pull request #11 from thekr1s/alsa-open-crash
Prevent crash in audio_backend/alsa.rs when switching from Kodi audio…
2018-02-07 15:08:52 +01:00
Sasha Hilton cfa7a62dfc Re-add serde_derive to lib.rs 2018-02-07 15:07:01 +01:00
Sasha Hilton 6a442a4570 Move keymaster to core 2018-02-06 19:54:28 +01:00
Robert b03430a057 minor code cleanup 2018-02-05 00:33:17 +01:00
Sasha Hilton 977a6db3ef
Merge pull request #116 from librespot-org/jackaudio
Jackaudio Support. Closes #93.
2018-02-04 20:23:16 +01:00
awiouy 2ae1f1399f simplify dns-sd/mdns code 2018-02-02 19:53:08 +01:00
Sasha Hilton 407e23b311
Merge branch 'master' into jackaudio 2018-02-02 05:12:36 +01:00
Sasha Hilton f35f52cbf9 Remove redundant code 2018-02-02 05:03:59 +01:00
Sasha Hilton 932441db45
Merge pull request #112 from librespot-org/feature_dns
Feature flag for selecting dns service
2018-01-31 21:51:59 +01:00
Sasha Hilton 7a58e6d561 fix addr in wrong place 2018-01-31 12:08:23 +01:00
Sasha Hilton d923f3bad3 Add with-dns-sd feature flag 2018-01-31 12:00:53 +01:00
Colm 8be642de31
Merge pull request #110 from librespot-org/inital-volume-ifelse-cleanup
Initial volume ifelse cleanup
2018-01-30 23:38:36 +00:00
Sasha Hilton fddcbbcd82 Tidied up Syntax 2018-01-31 00:05:54 +01:00