summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
authorschmirl <schmirl>2010-01-29 11:44:52 +0000
committerschmirl <schmirl>2010-01-29 11:44:52 +0000
commitc882a991ccee79ddde6e68d5f1684456a85b5729 (patch)
tree285724594597b35cdac75617aa452b0cb34c08ec /server
parentb44c9ac3f5a540f22bde390f471453a54881c5d7 (diff)
downloadvdr-plugin-streamdev-c882a991ccee79ddde6e68d5f1684456a85b5729.tar.gz
vdr-plugin-streamdev-c882a991ccee79ddde6e68d5f1684456a85b5729.tar.bz2
added VDR 1.7.11 parental rating support for VTP LSTE command (#555)
Diffstat (limited to 'server')
-rw-r--r--server/connectionVTP.c26
1 files changed, 24 insertions, 2 deletions
diff --git a/server/connectionVTP.c b/server/connectionVTP.c
index 5144457..9cdaaca 100644
--- a/server/connectionVTP.c
+++ b/server/connectionVTP.c
@@ -1,5 +1,5 @@
/*
- * $Id: connectionVTP.c,v 1.25 2009/10/13 06:38:47 schmirl Exp $
+ * $Id: connectionVTP.c,v 1.26 2010/01/29 11:44:52 schmirl Exp $
*/
#include "server/connectionVTP.h"
@@ -40,6 +40,9 @@ private:
#if defined(USE_PARENTALRATING) || defined(PARENTALRATINGCONTENTVERSNUM)
enum eStates { Channel, Event, Title, Subtitle, Description, Vps, Content,
EndEvent, EndChannel, EndEPG };
+#elif APIVERSNUM >= 10711
+ enum eStates { Channel, Event, Title, Subtitle, Description, Vps, Content, Rating,
+ EndEvent, EndChannel, EndEPG };
#else
enum eStates { Channel, Event, Title, Subtitle, Description, Vps,
EndEvent, EndChannel, EndEPG };
@@ -282,7 +285,7 @@ bool cLSTEHandler::Next(bool &Last)
break;
case Vps:
-#if defined(USE_PARENTALRATING) || defined(PARENTALRATINGCONTENTVERSNUM)
+#if defined(USE_PARENTALRATING) || defined(PARENTALRATINGCONTENTVERSNUM) || APIVERSNUM >= 10711
m_State = Content;
#else
m_State = EndEvent;
@@ -308,6 +311,25 @@ bool cLSTEHandler::Next(bool &Last)
} else
return Next(Last);
break;
+#elif APIVERSNUM >= 10711
+ case Content:
+ m_State = Rating;
+ if (!isempty(m_Event->ContentToString(m_Event->Contents()))) {
+ char *copy = strdup(m_Event->ContentToString(m_Event->Contents()));
+ cString cpy(copy, true);
+ strreplace(copy, '\n', '|');
+ return m_Client->Respond(-215, "G %i %i %s", m_Event->Contents() & 0xF0, m_Event->Contents() & 0x0F, copy);
+ } else
+ return Next(Last);
+ break;
+
+ case Rating:
+ m_State = EndEvent;
+ if (m_Event->ParentalRating())
+ return m_Client->Respond(-215, "R %d", m_Event->ParentalRating());
+ else
+ return Next(Last);
+ break;
#endif
case EndEvent: