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
Sasha Hilton
3efe499737
Merge pull request #109 from librespot-org/zeroconf_port
...
Add zeroconf-port option
2018-01-30 23:19:29 +01:00
ComlOnline
618eceb740
lost iv -
due to previous
2018-01-30 21:46:57 +00:00
ComlOnline
46de5a704b
Thats what I get for copypasta
2018-01-30 21:30:37 +00:00
ComlOnline
863ea9c976
removed and optimised
2018-01-30 20:52:25 +00:00
Sasha Hilton
8e8bab03d5
Add zeroconf-port option
2018-01-30 21:38:54 +01:00
thekr1s
63755aae46
Merge branch 'master' into alsa-open-crash
2018-01-30 18:53:11 +01:00
Sasha Hilton
91647ab2dd
Merge pull request #10 from thekr1s/progressive-voume-control
...
Change volume control to implement logarithmic scaling.
2018-01-30 17:38:40 +01:00
Robert
bec6b8c512
Changed volume control after discussion: https://github.com/librespot-org/librespot/pull/10
...
implement exponential volume control only
2018-01-29 23:39:55 +01:00
Robert
752a6b1df4
Prevent crash in audio_backend/alsa.rs when switching from Kodi audio to librespot
2018-01-26 01:42:24 +01:00
Robert
4870acd572
Add --progressive-volume option. Increase volume slowly at low level, faster at higher level
2018-01-25 23:37:28 +01:00
Thomas Bächler
2465b0f57f
Refactor the discovery module to remove usage of deprecated functions
2018-01-25 23:23:45 +01:00
Thomas Bächler
d36017d6f0
Remove usage of deprecated tokio_core::io
2018-01-25 23:23:45 +01:00
Thomas Bächler
630de8c0a9
Use futures::sync::mpsc::UnboundedSender::unbounded_send() instead of the deprecated send()
2018-01-25 23:23:45 +01:00
Thomas Bächler
5237203899
Remove usage of deprecated BoxFuture, BoxStream and BoxSink
2018-01-25 23:23:45 +01:00
Thomas Bächler
644355269e
Use futures::sync::oneshot::Sender::send() instead of the deprecated complete()
2018-01-25 23:23:45 +01:00
Colm
5302bd1072
Merge pull request #6 from brain0/work
...
Make librespot more robust against audio failures
2017-12-19 21:46:22 +00:00
Thomas Bächler
4cda8affcd
Handle audio sink errors in the player
...
Failing to open or write to the audio sink is not necessarily a fatal and permanent error.
When the audio sink fails, the player now tries to restart the sink periodically.
2017-12-18 00:56:37 +01:00
Thomas Bächler
f250179fed
Join the player thread when the player is dropped
2017-12-17 23:46:52 +01:00
Thomas Bächler
f5d8019c18
Add proper error handling to the pulseaudio backend and ensure that no invalid pointers are passed to pulseaudio
2017-12-17 23:28:42 +01:00
Thomas Bächler
35ec580eac
Disable the "variable does not need to be mutable" compiler warning in generated code
2017-12-17 23:15:49 +01:00
fossedihelm
de2b4cc8e3
added comments and edited README
2017-12-07 11:36:26 +01:00
fossedihelm
94e4cd853a
merge ColmOnline changes
2017-12-07 10:04:43 +01:00
fossedihelm
ac39da6c97
check if argument of initial-value is in the [0,100 range
2017-12-06 15:22:28 +01:00
fossedihelm
1dc99e3a15
check if argument of initial-value is a number
2017-12-06 14:47:46 +01:00
fossedihelm
8313da522b
--initial-volume as parameter
2017-12-06 14:37:34 +01:00
Federico Fossemò
9e51977885
reset volume to 50%
2017-12-04 12:16:41 +01:00
Federico Fossemò
c8a2190e9e
default volume to 20% (my config)
2017-12-04 11:37:36 +01:00
Federico Fossemò
20fc764916
default volume to 50%
2017-12-03 18:06:24 +01:00
ComlOnline
2bff5d0f21
Merge pull request #2 from kingosticks/master
...
Added repeat and shuffle support from kingosticks
2017-11-18 23:29:58 +00:00
ComlOnline
74964d8087
Merge pull request #1 from ipha/pulseaudio_stop_sink
...
Stop pulseaudio sink when not in use
2017-11-18 23:26:16 +00:00
Nick Steel
628df27292
Support for enabling shuffle.
2017-11-03 01:15:27 +00:00
nsteel
5581289351
Added repeat support
2017-10-28 00:24:11 +01:00
loblik
adeb22b2f3
add support for jack audio connection kit
...
This is initial support for JACK. It creates ports at startup and
keeps it connected while librespot is running. So when librespot
playback is stoped it writes silence (zeroes).
It uses jack crate (rust-jack) which needs libjack. To compile in
jack support use --features jackaudio-backend. And run librespot
with --backend jackaudio.
2017-10-05 21:06:51 +02:00
Paul Lietar
d1447d2bfb
Add support for lewton as an Vorbis decoder.
2017-08-04 05:28:25 +01:00
Paul Lietar
ec8f80df75
Create new librespot-audio crate
2017-08-03 20:37:04 +01:00
Paul Lietar
a51b562487
Create new librespot-metadata crate
2017-08-03 20:11:17 +01:00
Paul Lietar
bf60f6e7ab
Create new librespot-core crate
2017-08-03 19:58:44 +01:00
Paul Lietar
d59f3eff81
Remove AudioFileManager and MetadataManager since they are stateless.
2017-08-03 19:37:21 +01:00
Paul Lietar
72070b6ce0
Allow device type to be chosen.
...
Fix #187
2017-08-03 19:31:15 +01:00
Fabian Zaremba
910974e5e2
Change system_information_string according to request from Spotify ( #218 )
...
Spotify requested us to use a system_information_string that looks like
librespot_[short sha]_[random 8 characters build id]
2017-07-17 14:31:06 +02:00
michaelherger
67deb07250
Add --disable-audio-cache startup parameter ( #204 )
...
Disable caching of downloaded audio files at runtime. Comes in handy when running librespot on a small device with SD card or other small storage.
2017-06-30 07:43:11 +01:00
Paul Liétar
d09f469aad
Merge pull request #189 from jsopenrb/patch-1
...
Some tracks might have several `allowed` fields, librespot assumes that all fields must match, otherwise track cannot be played.
This change collects all `allowed` and `forbidden` lists, then does the final check on whole lists at once.
2017-06-10 21:13:07 +01:00
Paul Lietar
29d5f794d6
Make Librespot Connect Again !
2017-06-04 08:56:31 +01:00
Evgeny S
96c199e95a
Update metadata.rs
...
Turns out unreleased tracks can have no forbidden and allowed lists at all, take care of that.
2017-06-03 22:30:04 +03:00
Evgeny S
8bd9174370
Update metadata.rs
...
Properly check forbidden and allowed lists, skip tracks where allowed list is set but is empty.
2017-06-03 19:55:30 +03:00
Evgeny S
4a17a15a82
Fix #173 (a track cannot be played with librespot)
...
Some tracks might have several `allowed` fields, librespot assumes that all fields must match, otherwise track cannot be played.
This change collects all `allowed` and `forbidden` lists, then does the final check on whole lists at once.
2017-06-01 13:04:22 +03:00
Paul Lietar
6f24e3b731
Add support for new mercury subscription protocol.
...
Fixes #185
2017-05-15 23:47:34 +01:00
Paul Lietar
7c237c77df
Change Connect mercury URL
2017-05-15 21:55:49 +01:00
Paul Lietar
ba51b8f236
Add more mercury debug
2017-05-15 21:54:43 +01:00
Paul Lietar
28232b5a52
Add keymaster API
2017-05-10 16:26:48 +01:00
Paul Lietar
7ae919b1f7
Skip song if it fails to load
2017-04-29 15:18:16 +01:00
Paul Lietar
ded43122a2
Allow deprecated items.
...
Tokio has moved lots of stuff from tokio-core::io to tokio-io.
2017-04-29 12:56:15 +01:00
Johan Anderholm
e60cdeafca
hyper::Url -> hyper::Uri, portaudio -> portaudio-rs
...
hyper::Url is replaced by hyper::Uri in recent hyper versions.
portaudio was renamed to portaudio-rs and added to cargo.io
2017-04-29 13:06:29 +02:00
Paul Lietar
294a7821d6
Add simple playback example.
2017-04-28 23:24:55 +01:00
Jörg Krause
14da5c8f17
spirc: add more commands
...
Add play, playpause, pause, prev, next, volumeup, and volumedown.
volume up/down is realized in 16 steps.
2017-03-27 08:22:38 +02:00
Paul Lietar
6a0657fec6
Fix compiling error
2017-02-22 15:32:18 +00:00
Paul Lietar
188958710f
Download shannon dependency from crates.io
2017-02-22 14:48:41 +00:00
Paul Lietar
b8e4febb8e
main: Fix cache setup
2017-02-22 14:28:09 +00:00
Paul Lietar
d940ed161a
Allow switching user accounts at runtime
...
Fixes #130
2017-02-22 04:18:27 +00:00
Paul Lietar
2853e2230b
Force shutdown on second ^C
2017-02-21 23:25:04 +00:00
Paul Lietar
2708aa4fef
Merge remote-tracking branch 'origin/master'
2017-02-21 22:46:19 +00:00
Paul Lietar
58b1625445
Use function types instead of closures for backend builders.
2017-02-21 22:05:31 +00:00
Paul Lietar
5974cf7f24
Fixes for PR #148
2017-02-21 21:49:45 +00:00
Paul Lietar
6f1871d822
Merge remote-tracking branch 'origin/master'
2017-02-09 01:33:52 +00:00
Paul Lietar
64f9283b67
Fix Clippy warnings
2017-02-09 01:32:18 +00:00
Paul Lietar
19b06ae5fb
Update dependencies.
...
Rust 1.15 is now required.
2017-02-09 01:27:52 +00:00
Daniel Romero
10f9da410e
Remove code to notify spirc manager from the mixer
2017-02-03 17:11:36 +01:00
Daniel Romero
a7aba5c8e7
SoftVolumeMixer: move factor in again, otherwise i32 division always results in 0
2017-02-03 14:19:30 +01:00
Daniel Romero
44467a44d6
Call start and stop on mixer
2017-02-03 13:30:30 +01:00
Daniel Romero
5ef28bf2a5
SpircManager: Update state from player and mixer before sending info
2017-02-03 13:22:49 +01:00
Daniel Romero
ec0e81f0ae
Add documentation for channel macro
2017-02-03 13:22:49 +01:00
Daniel Romero
2c187eb3ae
Avoid copying the data array in the player
2017-02-03 13:22:49 +01:00
Daniel Romero
48a43f4948
Move structs which are send across threads to own module
2017-02-03 13:22:49 +01:00
Daniel Romero
da537b57f4
AudioFilter: Modify fn modify_stream(&self, data: &mut [i16]);
2017-02-03 13:22:49 +01:00
Daniel Romero
2de5d10a2f
SoftMixer: Change volume to AtomicUsize and pass AtomicUsize to SoftVolumeApplier
2017-02-03 13:22:49 +01:00
Daniel Romero
134239d298
Send update messages from mixer to SpircManager
2017-02-03 13:22:49 +01:00
Daniel Romero
c8ee08663d
Create channel in spirc instead of in mercury and use MercuryResponseSender implemented by macro
2017-02-03 13:22:49 +01:00
Daniel Romero
37916330b4
Add macro to be able to create wrapped senders to send multiple message types to one channel
2017-02-03 13:22:49 +01:00
Daniel Romero
e547a0c3da
Changes code review
2017-02-03 13:22:49 +01:00
Daniel Romero
636de3fe71
Use stream_editor in player
2017-02-03 13:22:49 +01:00
Daniel Romero
6df2af0ac9
Select mixer dynamically
2017-02-03 13:22:49 +01:00
Daniel Romero
464e85e285
Split mixer into Mixer and StreamEditor
2017-02-03 13:22:49 +01:00
Daniel Romero
59398b3cee
Remove mixer from Player and add it to SpircManager
2017-02-03 13:22:49 +01:00
Daniel Romero
347bf05dbe
Refactored to have apply_volume in a specifix mixer
2017-02-03 13:22:49 +01:00
Paul Lietar
9873eaf2a0
Better handling of shutdown
2017-01-31 08:21:30 +00:00
Paul Lietar
7be9626836
spirc: Increase the number of volume steps to 64
2017-01-30 04:13:18 +00:00
Paul Lietar
d2161ff75f
Use EasyBuf instead of copying buffers
2017-01-29 17:54:32 +00:00
Paul Lietar
bbc438d9b2
Clippy run
2017-01-29 17:20:12 +00:00
Paul Lietar
17482c236a
Stop caching audio keys, reenable audio file cache
2017-01-29 15:36:39 +00:00
Paul Lietar
8aeb266a2d
Refactor player and spirc
2017-01-29 15:02:12 +00:00
Paul Lietar
f3ba3f4bd4
Update dependencies
2017-01-29 12:50:18 +00:00
Paul Lietar
0da9020ad3
Store DeviceState directly into SpircTask
2017-01-20 14:44:13 +00:00
Paul Lietar
bcedfefaa9
Move spirc to tokio
2017-01-20 13:28:13 +00:00
Paul Lietar
d62a154786
Move session to tokio over fully
2017-01-20 02:40:07 +00:00
Paul Lietar
bf6be73caa
Move album cover to tokio
2017-01-20 01:59:47 +00:00
Paul Lietar
379c90c0b2
Move audio_file and channels to tokio
2017-01-20 01:59:47 +00:00
Paul Lietar
05118b40f8
Move MetadataManager to use tokio
2017-01-20 01:59:47 +00:00
Paul Lietar
bcbd7afb1a
Change mercury to use tokio
2017-01-20 01:59:47 +00:00
Paul Lietar
855a7e87a7
Move AudioKeyManager to tokio
2017-01-20 01:59:47 +00:00
Paul Lietar
d27063d5da
Create event loop in main
2017-01-20 01:59:46 +00:00
Paul Lietar
2a0ccc0d1d
Move device id into config
2017-01-20 01:59:46 +00:00
Paul Lietar
9de55bb8cd
Move ap resolve and discovery to tokio.
2017-01-20 01:59:46 +00:00
Paul Lietar
9d5e2e9fed
Rewrite connection layer to use tokio
2017-01-20 01:59:46 +00:00
Mitch Bigelow
4e02ef5a6c
Stop pulseaudio sink when not in use
2017-01-14 16:22:33 -05:00
Paul Lietar
aa499e0189
Get rid of main_helper
2017-01-10 16:31:12 +00:00
Paul Lietar
ae7c177823
Merge pull request #143 from SimonPersson/general_main_helper
...
Improve for library users
2017-01-06 17:32:28 +01:00
Simon Persson
560d4e1c4c
Move get_credentials to authentication module.
2017-01-06 17:18:41 +01:00
Simon Persson
f11310581c
Add standard traits to Bitrate.
2017-01-06 17:09:57 +01:00
Simon Persson
1f32efce83
Revert "Make main_helper useful with values not from getopts."
...
This reverts commit b4c7e8e057
.
2017-01-06 17:06:14 +01:00
Simon Persson
b828e4d528
Improve log strings and never log to stdout.
2017-01-06 15:21:44 +01:00
Simon Persson
28aed0d18b
Give Bitrate copy semantics.
...
For such a simple type, which will likely never change
to be un-copyable, it's nicer to have copy semantics.
2017-01-06 12:56:34 +01:00
Simon Persson
b4c7e8e057
Make main_helper useful with values not from getopts.
...
Applications that gets these values from config file
shouldn't have to reinvent the wheel.
2017-01-06 12:50:44 +01:00
Paul Lietar
e254bb7291
Remove support for Facebook authentication.
2017-01-05 14:40:33 +01:00
Paul Lietar
7ba3d766c0
Reduce log verbosity by default.
...
Fixes #141
2017-01-05 14:25:14 +01:00
Paul Lietar
d0a84d7915
Print password prompt on stderr.
2017-01-05 14:24:22 +01:00
Paul Lietar
baf2b65d7b
Use rustls rather than openssl
2016-12-31 14:49:04 +01:00
Paul Lietar
8831dea166
Add missing file :(
2016-12-31 13:24:18 +01:00
Paul Lietar
9c3541c41b
Change the stdout backend to work with arbitrary files.
2016-12-31 13:17:06 +01:00
Paul Lietar
512304c6c3
Merge remote-tracking branch 'badaix/master'
2016-12-31 13:04:14 +01:00
Jörg Krause
64b8b5f91a
Don't panic on error InitialFileHeadersCorrupt
2016-12-31 12:56:09 +01:00
Paul Lietar
8544faf75d
Only use syntex on modules that need it.
...
Also updated dependencies.
Fixes #133 and #138
2016-12-31 12:51:44 +01:00
Paul Lietar
7fd8503f45
Use the fallback AP when apresolve fails.
...
This matches the desktop client’s behaviour.
Fixes #136
2016-12-30 12:02:00 +01:00
badaix
383e0e9ae8
added stdout-backend
2016-11-22 15:31:59 +01:00
Paul Lietar
880a266625
Merge pull request #117 from joerg-krause/feature/onstart
...
Add --on{start,stop} command line option
2016-11-19 22:14:05 +00:00
Jörg Krause
c1e570f48d
Say goodbye when terminating
...
When librespot is terminated while a session is active it will now send
a goodbye message, so that the Spotify client unregisters the device
from its list.
Closes : #114
2016-09-20 21:00:01 +02:00
Jörg Krause
1d3c387fed
Add --on{start,stop} command line option
...
The --onstart and --onstop command line options can be used to run a
program when the audio playback is about to begin or has ended.
Note, that librespot needs executions rights to run the program.
Furthermore, the full path needs to be specified, e.g.
`/usr/bin/logger`. Executable scripts must begin with a shebang, e.g.
`#!/bin/sh`.
2016-09-08 20:52:21 +02:00
Paul Lietar
445171a46a
Add ALSA backend
...
Closes : #63
2016-08-27 20:14:11 +02:00
Paul Lietar
253dfb7c88
Merge pull request #107 from joerg-krause/fix/close-stream-on-stop
...
close stream on stop
2016-08-27 01:25:48 -07:00
Jörg Krause
0716643ae3
Fix out of bounds panic
...
Selecting a librespot device with the Spotify desktop client causes a
crash if the playlist is empty.
Take into account the case where an empty list of tracks is received. In
this case notify the desktop client, so it will accept the device and
turn the status bar green.
Closes : #71
2016-08-23 23:49:19 +02:00
herrernst
ceb375f37e
close stream on stop
2016-08-03 21:48:25 +02:00
Paul Lietar
7632fa4712
Merge pull request #93 from serprex/master
...
Replace time with std::time
2016-07-31 17:40:37 -07:00
Alain Boyer
82af7a3d71
Specify suggested_latency from device info.
...
- Update portaudio dependency.
- Pass default_high_output_latency to ensure robust playback.
- This is the same behavior as when previously using Stream::open_default().
2016-07-23 01:39:41 +03:00
Demur Rumed
674146f52a
Replace time with std::time
2016-07-17 03:25:29 +00:00
Paul Lietar
1396f9729a
Allow specifying an output device.
2016-07-06 10:54:46 +01:00
Paul Lietar
4cca541339
Remove the need for a application key.
2016-07-06 08:37:41 +01:00
Paul Lietar
b25585a41b
Use a pure rust mDNS responder instead of relying on Avahi / dns-sd.
...
Fixes #33 , #70
2016-07-06 02:36:01 +01:00
Paul Lietar
decce02373
Be a bit less verbose
2016-07-06 02:29:50 +01:00
Paul Lietar
24471eef9b
Use serde for json serialization.
2016-07-06 02:29:38 +01:00
Paul Lietar
e688914082
Fix some unused import warnings.
2016-07-06 01:36:46 +01:00
Paul Lietar
4d277e5b75
stream: refactor into a reactor pattern.
2016-05-09 12:22:51 +01:00
Paul Lietar
ed14c3469b
track: Use a linear map to store files by format.
2016-05-04 10:03:46 +01:00
Paul Lietar
c76b7b472f
Workaround weird parsing bug
2016-05-04 09:56:23 +01:00
Paul Lietar
dde613e0a0
player: skip unavailable tracks rather than crash
...
Fixes #74
2016-05-04 09:11:27 +01:00
Paul Lietar
a42752af2f
Update dependencies.
2016-04-24 15:40:05 +01:00
Paul Lietar
f50fca02ae
player: Add seek_at command for precise seeking
2016-04-24 14:48:15 +01:00
Paul Lietar
8c0a37357d
Fix static app key with syntex
2016-04-24 14:47:52 +01:00
Paul Lietar
a36325a46a
Add a main helper to make it easier to use librespot.
2016-04-24 13:29:26 +01:00
Paul Lietar
edb8a6a766
Cleanup authentication logic
2016-04-24 12:15:53 +01:00
Paul Lietar
c47a1b7ec9
Remove support for password in environment variable.
...
This is less useful now that saved credentials work.
2016-04-24 09:56:05 +01:00
Paul Lietar
f8cd09e5be
Use is_err rather than pattern matching.
2016-04-24 09:54:56 +01:00
Paul Lietar
8bbed4c162
Remove unused eprintln macro and hex dump function.
2016-04-24 09:50:55 +01:00
Marcus Thiesen
b0ea636179
Replace some more println with log
2016-04-23 13:35:00 +02:00
Tor Arne Vestbø
e08ed545ee
Use log crate instead of println
...
Allows more granular control over what gets logged to the console.
2016-04-23 13:35:00 +02:00
Paul Lietar
b8b0f9c36e
Fix seconds to milliseconds conversion in vorbis_time_tell_ms.
2016-04-23 00:09:19 +01:00
Marcus Thiesen
11e62d56d8
Use usize for pointer size
2016-03-21 10:13:28 +01:00
Marcus Thiesen
5ca2c35dbc
Pulseaudio backend
2016-03-21 09:39:58 +01:00
Paul Lietar
968a39a131
Make audio backend configurable at run time.
2016-03-20 16:16:20 +00:00
Paul Lietar
e6dd77fc02
Add missing file from previous commit.
2016-03-20 14:00:59 +00:00
Paul Lietar
01fa099cda
Reenable Facebook authentication.
2016-03-20 13:55:20 +00:00
Paul Lietar
b051bfcc5b
Disable Facebook authentication for now.
...
It got broken when moving to the authentication subdirectory.
2016-03-17 03:45:57 +00:00
Paul Lietar
230c891df0
Print librespot version on startup.
2016-03-17 03:31:57 +00:00
Paul Lietar
0770f6ce61
Move authentication to a different directory, and make discover use hyper.
2016-03-17 03:28:28 +00:00
Paul Lietar
85903a0da5
Split cache handling to separate module.
...
Use it for audio keys and album covers as well.
2016-03-16 04:20:42 +00:00
Paul Lietar
a7559787df
facebook: Use a random, OS-assigned port instead of hardcoded 8001.
2016-03-16 00:38:05 +00:00
Paul Lietar
4b4bc2f4e1
Add Facebook based login.
2016-03-16 00:05:05 +00:00
Paul Lietar
4d712efb48
Support downloading Album Covers.
2016-03-15 00:14:30 +00:00
Paul Lietar
aa1d466e92
Support building with the application key statically included in the binary.
2016-03-14 23:41:51 +00:00
Paul Lietar
a5453de572
Make cache directory optional.
...
If the -c argument is omitted, librespot will run without a cache, and
download tracks overtime they are played.
2016-03-14 22:57:00 +00:00
Yugo Amaryl
5f5356333d
Fix build by removing extra parenthesis
2016-03-14 06:00:06 +00:00
Paul Lietar
0973469120
Forgot to add some files in previous commit.
2016-03-14 00:50:42 +00:00
Paul Lietar
9274a6bfb3
Refactor audio output to make it more modular.
...
This makes the player less hard coded to portaudio, and easier to
experiment with different backends.
2016-03-14 00:49:21 +00:00
Paul Lietar
4b73f83c5e
Save reusable credentials to disk.
...
After the first login, credentials may be omitted from the command line
and the stored ones will be used instead.
2016-03-13 22:35:09 +00:00
Paul Lietar
39af43728a
Refactor authentication to separate protocol and token generation.
2016-03-13 20:45:31 +00:00
Paul Lietar
25bd38fd13
Resolve access point when connecting and pick a random one.
...
Spotify’s apresolve will return the best AP based on the user’s location.
2016-03-13 20:03:09 +00:00
Paul Lietar
60db12ee9e
Add missing semicolon.
...
Somehow syntex allows this, so it was missed in the previous commit.
2016-03-13 15:23:56 +00:00
Paul Lietar
ac5b34927f
Support using tremor instead of libvorbis for audio decoding.
...
Tremor is a fixed point / integer only Vorbis decoder.
This should improve playback performances on embedded platforms lacking
hardware floating point support.
2016-03-13 15:15:15 +00:00
Paul Lietar
d27c4ca752
Support building with rust stable, using syntex.
2016-03-07 18:22:41 +00:00
Paul Lietar
de357e63c9
player: Update the position on pause/play events.
2016-02-24 00:36:19 +00:00
Paul Lietar
c3c258dfaf
Bump protobuf-macros version and use the simpler string literal syntax
2016-02-22 05:48:58 +00:00
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
Simon Persson
3ccb2e2a10
Clean up before merging.
2016-02-19 00:02:41 +01: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
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
93640465dc
Import librespot_protocol as protocol.
2016-01-27 10:40:00 +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
ac0d597e75
Ignore files which don’t have an id.
...
Fixes #42
2016-01-20 10:37:57 +00:00
Erik
6f962089fd
added queue functionality and created load_tracks
2016-01-16 02:15:24 +01:00
Erik
4310162b88
Fixed the multiple volume vars and the calculation is a bit simplified.
2016-01-15 01:12:08 +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
7401fde7fc
Update dependencies
2016-01-13 00:17:05 +00: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
2c2ff16986
discovery: Truncate the AES key to 128
...
The computed key is 20 bytes long (SHA1 checksum), but it used for AES128.
The last 4 bytes should therefore be dropped.
2016-01-02 13:30:01 +01:00
Paul Lietar
f8956166ea
Add option to specify bitrate.
2016-01-02 03:30:24 +01:00
Paul Lietar
47c6d60b12
Merge branch 'env-password' of https://github.com/herrernst/librespot into master
2016-01-02 02:53:20 +01:00
Paul Lietar
e35da9c90a
Use discovery if username and password are not provided.
2016-01-02 02:30:03 +01:00
Paul Lietar
38351c9a87
Make dns-sd optional
2016-01-02 02:28:54 +01:00
Paul Lietar
bead9daf78
Add zeroconf based authentication.
2016-01-02 00:27:08 +01:00
Paul Lietar
4806f3e85a
mercury: Register subscription for all channel aliases
...
When subscribing to a channel, we may actually end up subscribed to other
alias channels. We must track these as well in order to redirect received
messages properly.
2016-01-02 00:02:22 +01:00
herrernst
7f8e85f90b
try reading password from env variable first, so it doesn't appear in process listing
2015-12-31 11:55:56 +01:00
Jaime Rodriguez
e321379501
Use canonical username when subscribing to spirc.
...
Uses canonical username that APWelcome message
contains once authenticated instead of username
provided by user. SpircManager now accesses it via
its Session field.
Fixes #15
2015-12-30 20:11:46 +01:00
Paul Lietar
525b27df98
Fix formula for the number of chunks.
...
It was rounding to the nearest boundary as opposed to rounding up. This
caused the last chunk to not always be downloaded.
2015-12-30 12:42:47 +01:00
Paul Lietar
654a403459
Improve handling of missing audio keys by failing the future rather than crashing.
2015-12-29 23:12:02 +01:00
Paul Lietar
8c2aa28d43
Use the correct country when checking for track availability.
2015-12-29 13:13:26 +01:00
Paul Lietar
22d586e473
Block player thread when nothing is playing.
2015-12-28 18:45:13 +01:00