summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HISTORY.h5
-rw-r--r--configs/epg.dat1
-rw-r--r--lib/epgservice.h11
-rw-r--r--update.c31
-rw-r--r--update.h1
5 files changed, 48 insertions, 1 deletions
diff --git a/HISTORY.h b/HISTORY.h
index 2e7c8d5..e8e524c 100644
--- a/HISTORY.h
+++ b/HISTORY.h
@@ -5,7 +5,7 @@
*
*/
-#define _VERSION "1.1.45"
+#define _VERSION "1.1.46"
#define VERSION_DATE "06.03.2017"
#define DB_API 4
@@ -19,6 +19,9 @@
/*
* ------------------------------------
+2017-03-06: version 1.1.46 (horchi)
+ - added: Added column for future features to vdrs table
+
2017-03-06: version 1.1.45 (horchi)
- change: Fixed order of push/tag in Makefile
diff --git a/configs/epg.dat b/configs/epg.dat
index 73f7abb..7338ee0 100644
--- a/configs/epg.dat
+++ b/configs/epg.dat
@@ -270,6 +270,7 @@ Table vdrs
MAC "" mac Ascii 18 Data,
PID "" pid UInt 0 Data filter epgd|httpd|epg2vdr,
SVDRP "" svdrp UInt 0 Data filter epgd|httpd|epg2vdr,
+ OSD2WEBP "" osd2webp UInt 0 Data,
TUNERCOUNT "" tunercount UInt 0 Data filter epgd|httpd|epg2vdr,
SHAREINWEB "" shareinweb UInt 1 Data,
diff --git a/lib/epgservice.h b/lib/epgservice.h
index 969d17d..ff32e3a 100644
--- a/lib/epgservice.h
+++ b/lib/epgservice.h
@@ -465,4 +465,15 @@ struct Mysql_Init_Exit_v1_0
MysqlInitExitAction action;
};
+//***************************************************************************
+// OSD2EPG Services
+//***************************************************************************
+
+#define OSD2WEB_PORT_SERVICE "osd2web-WebPortService-v1.0"
+
+struct Osd2Web_Port_v1_0
+{
+ int webPort;
+};
+
#endif // __EPGSERVICE_H
diff --git a/update.c b/update.c
index e789c8d..317451f 100644
--- a/update.c
+++ b/update.c
@@ -636,6 +636,11 @@ int cUpdate::initDb()
vdrDb->setValue("SHAREINWEB", Epg2VdrConfig.shareInWeb);
vdrDb->setValue("USECOMMONRECFOLDER", Epg2VdrConfig.useCommonRecFolder);
+ int osd2WebPort = getOsd2WebPort();
+
+ if (osd2WebPort != na)
+ vdrDb->setValue("OSD2WEBP", osd2WebPort);
+
// set svdrp port if uninitialized, we can't query ther actual port from VDR :(
if (vdrDb->getIntValue("SVDRP") == 0)
@@ -751,6 +756,32 @@ int cUpdate::checkConnection(int& timeout)
// Is Handler Master
//***************************************************************************
+int cUpdate::getOsd2WebPort()
+{
+ Osd2Web_Port_v1_0 req;
+ req.webPort = na;
+
+ cPlugin* osd2webPlugin = cPluginManager::GetPlugin("osd2web");
+ int osd2webPluginUuidService = osd2webPlugin && osd2webPlugin->Service(OSD2WEB_PORT_SERVICE, 0);
+
+ if (!osd2webPluginUuidService)
+ return na;
+
+ if (!osd2webPlugin->Service(OSD2WEB_PORT_SERVICE, &req))
+ {
+ tell(0, "Error: Call of service '%s' failed.", OSD2WEB_PORT_SERVICE);
+ return na;
+ }
+
+ tell(0, "Got webPort '%d' by osd2web", req.webPort);
+
+ return req.webPort;
+}
+
+//***************************************************************************
+// Is Handler Master
+//***************************************************************************
+
int cUpdate::isHandlerMaster()
{
static int initialized = no;
diff --git a/update.h b/update.h
index 3e4f8e6..3dde7fc 100644
--- a/update.h
+++ b/update.h
@@ -167,6 +167,7 @@ class cUpdate : public cThread, public cStatus, public cParameters
int storePicturesToFs();
int cleanupPictures();
int pictureLinkNeeded(const char* linkName);
+ int getOsd2WebPort();
tChannelID toChanID(const char* chanIdStr)
{