diff options
author | chriszero <zerov83@gmail.com> | 2015-03-01 18:03:14 +0100 |
---|---|---|
committer | chriszero <zerov83@gmail.com> | 2015-03-01 18:03:14 +0100 |
commit | f32ddb726d477ea1be41d852932d22b9def83d28 (patch) | |
tree | cc933c57ab5ead45fc5c8c4870ad0610c853607f | |
parent | 432cac91c6e5d861dc208f779aac8d3df2743eba (diff) | |
download | vdr-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.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -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); |