Commit graph

74 commits

Author SHA1 Message Date
Paul Lietar
bf60f6e7ab Create new librespot-core crate 2017-08-03 19:58:44 +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 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
Paul Lietar
294a7821d6 Add simple playback example. 2017-04-28 23:24:55 +01: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
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
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
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
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
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
aa499e0189 Get rid of main_helper 2017-01-10 16:31:12 +00:00
Simon Persson
560d4e1c4c Move get_credentials to authentication module. 2017-01-06 17:18:41 +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
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
7ba3d766c0 Reduce log verbosity by default.
Fixes #141
2017-01-05 14:25:14 +01:00
Paul Lietar
baf2b65d7b Use rustls rather than openssl 2016-12-31 14:49:04 +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
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
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
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
968a39a131 Make audio backend configurable at run time. 2016-03-20 16:16:20 +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
4b4bc2f4e1 Add Facebook based login. 2016-03-16 00:05:05 +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
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
90eeed3f80 rustfmt 2016-01-02 16:20:35 +01:00