summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchriszero <zerov83@gmail.com>2015-03-01 18:03:14 +0100
committerchriszero <zerov83@gmail.com>2015-03-01 18:03:14 +0100
commitf32ddb726d477ea1be41d852932d22b9def83d28 (patch)
treecc933c57ab5ead45fc5c8c4870ad0610c853607f
parent432cac91c6e5d861dc208f779aac8d3df2743eba (diff)
downloadvdr-plugin-plex-0.1.2.tar.gz
vdr-plugin-plex-0.1.2.tar.bz2
Fixes incorrect title display0.1.2
-rw-r--r--PVideo.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/PVideo.cpp b/PVideo.cpp
index 0518afb..a0da43f 100644
--- a/PVideo.cpp
+++ b/PVideo.cpp
@@ -74,6 +74,7 @@ void Video::Parse(Poco::XML::Node* pNode)
Poco::XML::AutoPtr<Poco::XML::NamedNodeMap> pAttribs = pNode->attributes();
m_iRatingKey = GetNodeValueAsInt(pAttribs->getNamedItem("ratingKey"));
+ m_iIndex = GetNodeValueAsInt(pAttribs->getNamedItem("index"));
m_iParentIndex = GetNodeValueAsInt(pAttribs->getNamedItem("parentIndex"));
m_sKey = GetNodeValue(pAttribs->getNamedItem("key"));
m_sStudio = GetNodeValue(pAttribs->getNamedItem("studio"));
@@ -117,7 +118,12 @@ std::string Video::GetTitle()
std::string res = m_sTitle;
switch(m_tType) {
case MOVIE:
- res = Poco::format("%s (%d)", m_sTitle, m_iYear);
+ if(m_iYear > 0) {
+ res = Poco::format("%s (%d)", m_sTitle, m_iYear);
+ }
+ else {
+ res = m_sTitle;
+ }
break;
case EPISODE:
res = Poco::format("%02dx%02d - %s", m_iParentIndex, m_iIndex, m_sTitle);