summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
authormethodus <methodus@web.de>2012-11-01 17:05:33 +0100
committermethodus <methodus@web.de>2012-11-01 17:05:33 +0100
commit9d9684f5bcfaabd05f4d41b0c7d2a35d7b1a489c (patch)
tree5f7d21d1d7113b0ff3da6a8397670113ae061204 /server
parent36698ebe1b5dfa6f95041b168c9218d66ee0eb03 (diff)
downloadvdr-plugin-upnp-9d9684f5bcfaabd05f4d41b0c7d2a35d7b1a489c.tar.gz
vdr-plugin-upnp-9d9684f5bcfaabd05f4d41b0c7d2a35d7b1a489c.tar.bz2
Added german and finnish translation and some fixes. Thanks to Rolf Ahrenberg
Diffstat (limited to 'server')
-rw-r--r--server/server.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/server/server.cpp b/server/server.cpp
index b6e3076..616d55b 100644
--- a/server/server.cpp
+++ b/server/server.cpp
@@ -8,6 +8,8 @@
#include <vdr/tools.h>
#include <string>
#include <sstream>
+#include <boost/algorithm/string.hpp>
+#include <unistd.h>
#include "../include/server.h"
#include "../include/service.h"
#include "../include/webserver.h"
@@ -25,7 +27,7 @@ cMediaServer* cMediaServer::GetInstance(){
cMediaServer::cMediaServer()
: mServerDescription("VDR UPnP/DLNA MS", "Denis Loh", "http://upnp.vdr-developer.org",
- DESCRIPTION, "VDR UPnP-DLNA MS", VERSION,
+ tr(DESCRIPTION), "VDR UPnP-DLNA MS", VERSION,
"http://projects.vdr-developer.org/projects/plg-upnp/files", VERSION,
"deviceDescription.xml")
, mDeviceHandle(0)
@@ -34,6 +36,14 @@ cMediaServer::cMediaServer()
, mWebserver(NULL)
, mMediaManager(NULL)
{
+ char tmp[255];
+
+ if (gethostname(tmp, sizeof(tmp)) == 0) {
+ string name = tmp;
+ boost::to_upper(name);
+ mServerDescription.friendlyName = name + ": " + mServerDescription.friendlyName;
+ }
+
mServerIcons.push_back(ServerIcon(image::DLNA_ICON_PNG_SM_24A, "images/upnpIconSm.png"));
mServerIcons.push_back(ServerIcon(image::DLNA_ICON_PNG_LRG_24A, "images/upnpIconLrg.png"));
mServerIcons.push_back(ServerIcon(image::DLNA_ICON_JPEG_SM_24, "images/upnpIconSm.jpeg"));