summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchriszero <zerov83@gmail.com>2015-03-09 19:37:18 +0100
committerchriszero <zerov83@gmail.com>2015-03-09 19:37:18 +0100
commiteb49ddb616958c42357db216c721a5211abc7659 (patch)
tree91eae9ffb822b3a7a610c81075441623971add89
parent9dc09e5828cbe6f12e665f2336246be1b785b4d9 (diff)
downloadvdr-plugin-plex-eb49ddb616958c42357db216c721a5211abc7659.tar.gz
vdr-plugin-plex-eb49ddb616958c42357db216c721a5211abc7659.tar.bz2
Using hostname for player registraton.
-rw-r--r--PlexHTTPRequestHandler.cpp11
-rw-r--r--plex.cpp2
2 files changed, 5 insertions, 8 deletions
diff --git a/PlexHTTPRequestHandler.cpp b/PlexHTTPRequestHandler.cpp
index 552239a..4de66f1 100644
--- a/PlexHTTPRequestHandler.cpp
+++ b/PlexHTTPRequestHandler.cpp
@@ -31,8 +31,7 @@ void PlexHTTPRequestHandler::AddHeaders(Poco::Net::HTTPServerResponse& response,
response.add("Access-Control-Allow-Origin", "*");
response.add("X-Plex-Version", VERSION);
response.add("X-Plex-Client-Identifier", Config::GetInstance().GetUUID());
- response.add("X-Plex-Product", "player");
- response.add("X-Plex-Product", "PlexVDR");
+ response.add("X-Plex-Product", DESCRIPTION);
response.add("X-Plex-Device-Name", Config::GetInstance().GetHostname());
response.add("X-Plex-Platform", "VDR");
response.add("X-Plex-Model", "Linux");
@@ -148,16 +147,14 @@ void ResourceRequestHandler::handleRequest(Poco::Net::HTTPServerRequest& request
std::ostream& ostr = response.send();
ostr << "<?xml version=\"1.0\" encoding=\"utf-8\"?>"
"<MediaContainer>"
- "<Player title=\"" << Config::GetInstance().GetHostname()
- << "\""
+ "<Player title=\"" << Config::GetInstance().GetHostname() << "\""
" protocol=\"plex\""
" protocolVersion=\"1\""
" protocolCapabilities=\"navigation,playback,timeline\""
" machineIdentifier=\"" << Config::GetInstance().GetUUID() << "\""
- " product=\"PlexVDR\""
+ " product=\"" << DESCRIPTION << "\""
" platform=\"Linux\""
- " platformVersion=\"" << VERSION
- << "\""
+ " platformVersion=\"" << VERSION << "\""
" deviceClass=\"HTPC\""
"/> </MediaContainer>";
diff --git a/plex.cpp b/plex.cpp
index 8b78f95..fe937bb 100644
--- a/plex.cpp
+++ b/plex.cpp
@@ -332,7 +332,7 @@ bool cMyPlugin::Initialize(void)
// First Startup? Save UUID
SetupStore("UUID", Config::GetInstance().GetUUID().c_str());
- plexclient::plexgdm::GetInstance().clientDetails(Config::GetInstance().GetUUID(), DESCRIPTION, "3200", "VDR", VERSION);
+ plexclient::plexgdm::GetInstance().clientDetails(Config::GetInstance().GetUUID(), Config::GetInstance().GetHostname(), "3200", DESCRIPTION, VERSION);
plexclient::plexgdm::GetInstance().Start();
plexclient::ControlServer::GetInstance().Start();