summaryrefslogtreecommitdiff
path: root/XmlObject.cpp
diff options
context:
space:
mode:
authorchriszero <zerov83@gmail.com>2015-01-17 22:42:08 +0100
committerchriszero <zerov83@gmail.com>2015-01-17 22:42:08 +0100
commitd3777dd6bcb11ceea85eca91e670d7872ba7b1ea (patch)
tree0f105aa75321c5c83a17c0c9338fb2534f61fc38 /XmlObject.cpp
parentadc0c699c19b0389b899230a73f3ab635bcdc5c3 (diff)
downloadvdr-plugin-plex-d3777dd6bcb11ceea85eca91e670d7872ba7b1ea.tar.gz
vdr-plugin-plex-d3777dd6bcb11ceea85eca91e670d7872ba7b1ea.tar.bz2
Added current status of played stream (current, total time, play, pause)
Diffstat (limited to 'XmlObject.cpp')
-rw-r--r--XmlObject.cpp21
1 files changed, 12 insertions, 9 deletions
diff --git a/XmlObject.cpp b/XmlObject.cpp
index 923d2d1..a9c0bb4 100644
--- a/XmlObject.cpp
+++ b/XmlObject.cpp
@@ -1,16 +1,8 @@
#include "XmlObject.h"
+#include <vdr/tools.h>
namespace plexclient
{
-
-XmlObject::XmlObject()
-{
-}
-
-XmlObject::~XmlObject()
-{
-}
-
std::string XmlObject::GetNodeValue(Poco::XML::Node* pNode)
{
std::string value;
@@ -42,6 +34,17 @@ long XmlObject::GetNodeValueAsLong(Poco::XML::Node* pNode)
return value;
}
+double XmlObject::GetNodeValueAsDouble(Poco::XML::Node* pNode)
+{
+ double value = 0;
+ if(pNode != 0) {
+ try {
+ value = atod(pNode->getNodeValue().c_str());
+ } catch(Poco::Exception) {}
+ }
+ return value;
+}
+
bool XmlObject::GetNodeValueAsBool(Poco::XML::Node* pNode)
{
bool value = false;