Support for text tags through snapcast.

Only added tags Spotify stream input from modified librespot
for now.
This commit is contained in:
frafall 2017-11-29 14:36:28 +01:00
parent af3ea660b9
commit 67083975b0
10 changed files with 206 additions and 92 deletions

View file

@ -135,9 +135,12 @@ void SpotifyStream::onStderrMsg(const char* buffer, size_t n)
{
// Create a new meta struct?
LOG(INFO) << "Loading track <" << m[1] << "> <" << m[2] << ">\n";
getMeta()->setArtist(m[1]);
getMeta()->setAlbum("");
getMeta()->setTrack(m[2]);
json jtag = {
{"artist", (string)m[1]},
{"track", (string)m[2]}
};
meta_.reset(new msg::StreamTags(jtag));
// Trigger a stream update
if (pcmListener_)