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

@ -133,6 +133,15 @@ void Controller::onMessageReceived(ClientConnection* connection, const msg::Base
player_->setMute(serverSettings_->isMuted());
player_->start();
}
else if (baseMessage.type == message_type::kStreamTags)
{
streamTags_.reset(new msg::StreamTags());
streamTags_->deserialize(baseMessage, buffer);
LOG(INFO) << "Tag received: artist = " << streamTags_->getArtist() << "\n";
LOG(INFO) << "Tag received: album = " << streamTags_->getAlbum() << "\n";
LOG(INFO) << "Tag received: track = " << streamTags_->getTrack() << "\n";
}
if (baseMessage.type != message_type::kTime)
if (sendTimeSyncMessage(1000))