mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 00:41:09 +02:00
infoviewer: try to get meta data from stream when epg is empty
Origin commit data
------------------
Branch: ni/coolstream
Commit: 9b34075224
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-11-05 (Sun, 05 Nov 2017)
Origin message was:
------------------
- infoviewer: try to get meta data from stream when epg is empty
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -1037,6 +1037,51 @@ bool CInfoViewer::showLivestreamInfo()
|
|||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
// FIXME: move this block in the block above
|
||||||
|
else if (web_mode && cc->getEpgID() == 0)
|
||||||
|
{
|
||||||
|
// try to get meta data
|
||||||
|
std::string livestreamInfo1 = "";
|
||||||
|
std::string livestreamInfo2 = "";
|
||||||
|
std::string artist = "";
|
||||||
|
std::string title = "";
|
||||||
|
std::vector<std::string> keys, values;
|
||||||
|
cPlayback *playback = CMoviePlayerGui::getInstance().getPlayback();
|
||||||
|
if (playback)
|
||||||
|
playback->GetMetadata(keys, values);
|
||||||
|
size_t count = keys.size();
|
||||||
|
if (count > 0) {
|
||||||
|
for (size_t i = 0; i < count; i++) {
|
||||||
|
std::string key = trim(keys[i]);
|
||||||
|
if (!strcasecmp("artist", key.c_str())) {
|
||||||
|
artist = isUTF8(values[i]) ? values[i] : convertLatin1UTF8(values[i]);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (!strcasecmp("title", key.c_str())) {
|
||||||
|
title = isUTF8(values[i]) ? values[i] : convertLatin1UTF8(values[i]);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!artist.empty())
|
||||||
|
{
|
||||||
|
livestreamInfo1 = artist;
|
||||||
|
}
|
||||||
|
if (!title.empty())
|
||||||
|
{
|
||||||
|
if (!livestreamInfo1.empty())
|
||||||
|
livestreamInfo1 += " - ";
|
||||||
|
livestreamInfo1 += title;
|
||||||
|
}
|
||||||
|
if (livestreamInfo1 != _livestreamInfo1 || livestreamInfo2 != _livestreamInfo2) {
|
||||||
|
display_Info(livestreamInfo1.c_str(), livestreamInfo2.c_str(), false);
|
||||||
|
_livestreamInfo1 = livestreamInfo1;
|
||||||
|
_livestreamInfo2 = livestreamInfo2;
|
||||||
|
infoViewerBB->showBBButtons(true /*paintFooter*/);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user