summaryrefslogtreecommitdiff
path: root/plexgdm.cpp
diff options
context:
space:
mode:
authorchriszero <zerov83@gmail.com>2015-04-05 13:31:04 +0200
committerchriszero <zerov83@gmail.com>2015-04-05 13:31:04 +0200
commitf7f62b7ff1f12c1563a04560ad87d2f92a3e0af9 (patch)
tree4dd38d637ad2d5427c93a8d8d695e91c11df33d4 /plexgdm.cpp
parent21ee9e67ff7029c099c9fd772d3dc3e23c955199 (diff)
downloadvdr-plugin-plex-f7f62b7ff1f12c1563a04560ad87d2f92a3e0af9.tar.gz
vdr-plugin-plex-f7f62b7ff1f12c1563a04560ad87d2f92a3e0af9.tar.bz2
More Skindesigner support.
Define a custom server
Diffstat (limited to 'plexgdm.cpp')
-rw-r--r--plexgdm.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/plexgdm.cpp b/plexgdm.cpp
index d8da646..4878012 100644
--- a/plexgdm.cpp
+++ b/plexgdm.cpp
@@ -1,5 +1,6 @@
#include <vdr/tools.h>
#include "plexgdm.h"
+#include "Config.h"
#include <ctime>
namespace plexclient
@@ -57,7 +58,11 @@ std::string plexgdm::getClientDetails()
void plexgdm::Action()
{
-
+ if(Config::GetInstance().UseConfiguredServer) {
+ // Adds a Server to vector
+ GetServer(Config::GetInstance().s_serverHost, Config::GetInstance().ServerPort);
+ }
+
char buffer[1024];
m_registrationIsRunning = true;
m_discoveryIsRunning = true;
@@ -186,4 +191,10 @@ PlexServer* plexgdm::GetServer(std::string ip, int port)
return &m_vServers[m_vServers.size()-1];
}
+PlexServer* plexgdm::GetFirstServer()
+{
+ if(m_vServers.size() > 0) return &m_vServers[0];
+ else return NULL;
+}
+
} // namespace