summaryrefslogtreecommitdiff
path: root/Directory.cpp
diff options
context:
space:
mode:
authorchriszero <zerov83@gmail.com>2015-02-14 18:53:11 +0100
committerchriszero <zerov83@gmail.com>2015-02-14 18:53:11 +0100
commite412257abf8de4576a180351d24ff07589fa630c (patch)
treeed020de5c8257545eca66e96997984731ac60379 /Directory.cpp
parent20fefdd3f341d6e7f6b15e4926bf5569aa1943d5 (diff)
downloadvdr-plugin-plex-e412257abf8de4576a180351d24ff07589fa630c.tar.gz
vdr-plugin-plex-e412257abf8de4576a180351d24ff07589fa630c.tar.bz2
Various Fixes0.1.0
Bump Version to frist beta.
Diffstat (limited to 'Directory.cpp')
-rw-r--r--Directory.cpp19
1 files changed, 14 insertions, 5 deletions
diff --git a/Directory.cpp b/Directory.cpp
index c54580f..46f2d54 100644
--- a/Directory.cpp
+++ b/Directory.cpp
@@ -1,19 +1,24 @@
#include "Directory.h"
+#include <Poco/Format.h>
namespace plexclient
{
-Directory::Directory(Poco::XML::Node* pNode)
+Directory::Directory(Poco::XML::Node* pNode, MediaContainer* parent)
{
if(Poco::icompare(pNode->nodeName(), "Directory") == 0) {
-
+ m_pParent = parent;
Poco::XML::AutoPtr<Poco::XML::NamedNodeMap> pAttribs = pNode->attributes();
m_bAllowSync = GetNodeValueAsBool(pAttribs->getNamedItem("allowSync"));
+ m_iIndex = GetNodeValueAsInt(pAttribs->getNamedItem("index"));
+ m_iYear = GetNodeValueAsInt(pAttribs->getNamedItem("year"));
m_sArt = GetNodeValue(pAttribs->getNamedItem("art"));
m_sThumb = GetNodeValue(pAttribs->getNamedItem("thumb"));
m_sKey = GetNodeValue(pAttribs->getNamedItem("key"));
m_sTitle = GetNodeValue(pAttribs->getNamedItem("title"));
+ m_sTitle1 = GetNodeValue(pAttribs->getNamedItem("title1"));
+ m_sTitle2 = GetNodeValue(pAttribs->getNamedItem("title2"));
m_sComposite = GetNodeValue(pAttribs->getNamedItem("composite"));
m_sLanguage = GetNodeValue(pAttribs->getNamedItem("language"));
m_sUuid = GetNodeValue(pAttribs->getNamedItem("uuid"));
@@ -25,10 +30,14 @@ Directory::Directory(Poco::XML::Node* pNode)
}
}
-Directory::~Directory()
+std::string Directory::GetTitle()
{
+ switch(m_eType) {
+ case SEASON:
+ return Poco::format("%s - Staffel %d", m_pParent->m_sTitle2, m_iIndex);
+ default:
+ return m_sTitle;
+ }
}
-
}
-