diff options
author | chriszero <zerov83@gmail.com> | 2015-02-22 16:26:29 +0100 |
---|---|---|
committer | chriszero <zerov83@gmail.com> | 2015-02-22 16:26:29 +0100 |
commit | a4567e4d33727c941a8abe14c8165f212835f064 (patch) | |
tree | c2437e167edbb9d353981242810755f53be88860 /Stream.cpp | |
parent | 3f4e427c519aebc2e918443bc03dbec6c5344416 (diff) | |
download | vdr-plugin-plex-a4567e4d33727c941a8abe14c8165f212835f064.tar.gz vdr-plugin-plex-a4567e4d33727c941a8abe14c8165f212835f064.tar.bz2 |
Video is now able to update itself
Diffstat (limited to 'Stream.cpp')
-rw-r--r-- | Stream.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -1,4 +1,5 @@ #include "Stream.h" +#include <Poco/Format.h> namespace plexclient { @@ -8,7 +9,8 @@ Stream::Stream(Poco::XML::Node* pNode) if(Poco::icompare(pNode->nodeName(), "Stream") == 0) { Poco::XML::AutoPtr<Poco::XML::NamedNodeMap> pAttribs = pNode->attributes(); - + + m_bSelected = GetNodeValueAsBool(pAttribs->getNamedItem("selected")); m_iID = GetNodeValueAsInt(pAttribs->getNamedItem("id")); m_iStreamType = GetNodeValueAsInt(pAttribs->getNamedItem("streamType")); m_iIndex = GetNodeValueAsInt(pAttribs->getNamedItem("index")); @@ -23,4 +25,12 @@ Stream::Stream(Poco::XML::Node* pNode) } } +std::string Stream::GetSetStreamQuery() +{ + if(m_eStreamType == sAUDIO) return Poco::format("audioStreamID=%d", m_iID); + else if(m_eStreamType == sSUBTITLE && m_iID >= 0) return Poco::format("subtitleStreamID=%d", m_iID); + else if(m_eStreamType == sSUBTITLE && m_iID < 0) return "subtitleStreamID="; + else return ""; +} + } // namespace |