Skip to content

Commit

Permalink
parse and include event icons (fixes #78)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jalle19 committed Jul 7, 2015
1 parent 6c82710 commit 4c05431
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -654,6 +654,7 @@ extern "C" {
event.strPlot = programme->m_description.c_str();
event.iYear = programme->m_year;
event.strEpisodeName = programme->m_subTitle.c_str();
event.strIconPath = programme->m_icon.c_str();

std::string directors = xmltv::Utilities::ConcatenateStringList(programme->GetDirectors());
std::string writers = xmltv::Utilities::ConcatenateStringList(programme->GetWriters());
Expand Down
5 changes: 5 additions & 0 deletions src/xmltv/Programme.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ Programme::Programme(const tinyxml2::XMLElement *xml)
if (element)
m_year = Utilities::QueryIntText(element);

// Icon
element = xml->FirstChildElement("icon");
if (element)
m_icon = element->Attribute("src");

// Categories. Skip "movie" and "series" since most people treat categories
// as genres
for (element = xml->FirstChildElement("category");
Expand Down
1 change: 1 addition & 0 deletions src/xmltv/Programme.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ namespace xmltv {
std::string m_channelName;
std::string m_title;
std::string m_description;
std::string m_icon;
std::string m_subTitle;
int m_year;
std::string m_starRating;
Expand Down

0 comments on commit 4c05431

Please sign in to comment.