Added basics for maintaining metadata by stream on server and pushing to clients.

Modified Spotify stream handler to get the track name from Libreelec's stderr.
Note, to support artist/album (or album art) we need to modify Libreelec
to print these.
This commit is contained in:
frafall 2017-11-20 20:44:54 +01:00
parent 034c7f5f98
commit d444052233
11 changed files with 166 additions and 2 deletions

View file

@ -19,6 +19,7 @@
#include "streamServer.h"
#include "message/time.h"
#include "message/hello.h"
#include "message/streamTags.h"
#include "aixlog.hpp"
#include "config.h"
#include <iostream>
@ -516,6 +517,14 @@ void StreamServer::onMessageReceived(StreamSession* connection, const msg::BaseM
Config::instance().save();
// Send the group stream tags
LOG(INFO) << "request kStreamTags\n";
//auto metaTags = make_shared<msg::StreamTags>();
//metaTags->setArtist(stream->getMeta()->getArtist());
//connection->sendAsync(metaTags);
connection->sendAsync(stream->getMeta());
LOG(INFO) << "kStreamTags sent\n";
connection->setPcmStream(stream);
auto headerChunk = stream->getHeader();
connection->sendAsync(headerChunk);