new parameter "devicename" (=Snapcast)

This commit is contained in:
badaix 2016-11-01 18:57:23 +01:00
parent a98629563f
commit 1cc4bc23e7
2 changed files with 4 additions and 1 deletions

View file

@ -32,7 +32,8 @@ SpotifyStream::SpotifyStream(PcmListener* pcmListener, const StreamUri& uri) : P
string username = uri_.getQuery("username", ""); string username = uri_.getQuery("username", "");
string password = uri_.getQuery("password", ""); string password = uri_.getQuery("password", "");
string bitrate = uri_.getQuery("bitrate", "320"); string bitrate = uri_.getQuery("bitrate", "320");
params = "--name \"" + name_ + "\" --username \"" + username + "\" --password \"" + password + "\" --bitrate " + bitrate + " --backend stdout"; string devicename = uri_.getQuery("devicename", "Snapcast");
params = "--name \"" + devicename + "\" --username \"" + username + "\" --password \"" + password + "\" --bitrate " + bitrate + " --backend stdout";
logO << "params: " << params << "\n"; logO << "params: " << params << "\n";
} }

View file

@ -27,6 +27,8 @@
* Starts librespot, reads PCM data from stdout, and passes the data to an encoder. * Starts librespot, reads PCM data from stdout, and passes the data to an encoder.
* Implements EncoderListener to get the encoded data. * Implements EncoderListener to get the encoded data.
* Data is passed to the PcmListener * Data is passed to the PcmListener
* usage:
* snapserver -s "spotify:///librespot?name=Spotify&username=<my username>&password=<my password>[&devicename=Snapcast][&bitrate=320]"
*/ */
class SpotifyStream : public ProcessStream class SpotifyStream : public ProcessStream
{ {