Skip to content

Commit

Permalink
Merge pull request #263 from 2small/Matrix
Browse files Browse the repository at this point in the history
Add support for sub-title/actor/director/writer
  • Loading branch information
phunkyfish authored Aug 15, 2019
2 parents 67f0c0d + 565e59b commit 53d179c
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pvr.iptvsimple/addon.xml.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<addon
id="pvr.iptvsimple"
version="4.1.0"
version="4.2.0"
name="PVR IPTV Simple Client"
provider-name="nightik">
<requires>@ADDON_DEPENDS@</requires>
Expand Down
3 changes: 3 additions & 0 deletions pvr.iptvsimple/changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
v4.2.0
- Add support for sub-title/actor/director/writer in XML

v4.1.0
- Support EXTVCOPT in m3u8
- Build helper script for OSX
Expand Down
16 changes: 12 additions & 4 deletions src/PVRIptvData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,14 @@ bool PVRIptvData::LoadEPG(time_t iStart, time_t iEnd)
GetNodeValue(pChannelNode, "title", entry.strTitle);
GetNodeValue(pChannelNode, "desc", entry.strPlot);
GetNodeValue(pChannelNode, "category", entry.strGenreString);
GetNodeValue(pChannelNode, "sub-title", entry.strEpisodeName);

xml_node<> *pCreditsNode = pChannelNode->first_node("credits");
if (pCreditsNode != NULL) {
GetNodeValue(pCreditsNode, "actor", entry.strCast);
GetNodeValue(pCreditsNode, "director", entry.strDirector);
GetNodeValue(pCreditsNode, "writer", entry.strWriter);
}

xml_node<>* pIconNode = pChannelNode->first_node("icon");
if (!pIconNode || !GetAttributeValue(pIconNode, "src", entry.strIconPath))
Expand Down Expand Up @@ -810,9 +818,9 @@ PVR_ERROR PVRIptvData::GetEPGForChannel(ADDON_HANDLE handle, int iChannelUid, ti
tag.strPlotOutline = myTag.strPlotOutline.c_str();
tag.strPlot = myTag.strPlot.c_str();
tag.strOriginalTitle = nullptr; /* not supported */
tag.strCast = nullptr; /* not supported */
tag.strDirector = nullptr; /* not supported */
tag.strWriter = nullptr; /* not supported */
tag.strCast = myTag.strCast.c_str();
tag.strDirector = myTag.strDirector.c_str();
tag.strWriter = myTag.strWriter.c_str();
tag.iYear = 0; /* not supported */
tag.strIMDBNumber = nullptr; /* not supported */
tag.strIconPath = myTag.strIconPath.c_str();
Expand All @@ -833,7 +841,7 @@ PVR_ERROR PVRIptvData::GetEPGForChannel(ADDON_HANDLE handle, int iChannelUid, ti
tag.iSeriesNumber = 0; /* not supported */
tag.iEpisodeNumber = 0; /* not supported */
tag.iEpisodePartNumber = 0; /* not supported */
tag.strEpisodeName = nullptr; /* not supported */
tag.strEpisodeName = myTag.strEpisodeName.c_str();
tag.iFlags = EPG_TAG_FLAG_UNDEFINED;

PVR->TransferEpgEntry(handle, &tag);
Expand Down
4 changes: 4 additions & 0 deletions src/PVRIptvData.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,14 @@ struct PVRIptvEpgEntry
time_t startTime;
time_t endTime;
std::string strTitle;
std::string strEpisodeName;
std::string strPlotOutline;
std::string strPlot;
std::string strIconPath;
std::string strGenreString;
std::string strCast;
std::string strDirector;
std::string strWriter;
};

struct PVRIptvEpgChannel
Expand Down

0 comments on commit 53d179c

Please sign in to comment.