Skip to content

Commit

Permalink
Merge pull request #261 from 2small/Leia
Browse files Browse the repository at this point in the history
Add support for episode-name/cast/director/writer
  • Loading branch information
phunkyfish authored Aug 19, 2019
2 parents 6c53796 + 936eceb commit 4ae8cc4
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="3.5.8"
version="3.6.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 @@
v3.6.0
- Add support for sub-title/actor/director/writer

v3.5.8
- Fix wrong EPG times due to DST on Windows

Expand Down
16 changes: 12 additions & 4 deletions src/PVRIptvData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,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 == NULL || !GetAttributeValue(pIconNode, "src", entry.strIconPath))
Expand Down Expand Up @@ -802,9 +810,9 @@ PVR_ERROR PVRIptvData::GetEPGForChannel(ADDON_HANDLE handle, const PVR_CHANNEL &
tag.strPlotOutline = myTag->strPlotOutline.c_str();
tag.strPlot = myTag->strPlot.c_str();
tag.strOriginalTitle = NULL; /* not supported */
tag.strCast = NULL; /* not supported */
tag.strDirector = NULL; /* not supported */
tag.strWriter = NULL; /* 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 = NULL; /* not supported */
tag.strIconPath = myTag->strIconPath.c_str();
Expand All @@ -826,7 +834,7 @@ PVR_ERROR PVRIptvData::GetEPGForChannel(ADDON_HANDLE handle, const PVR_CHANNEL &
tag.iSeriesNumber = 0; /* not supported */
tag.iEpisodeNumber = 0; /* not supported */
tag.iEpisodePartNumber = 0; /* not supported */
tag.strEpisodeName = NULL; /* 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 @@ -38,10 +38,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 4ae8cc4

Please sign in to comment.