diff options
author | schmirl <schmirl> | 2010-01-29 11:44:52 +0000 |
---|---|---|
committer | schmirl <schmirl> | 2010-01-29 11:44:52 +0000 |
commit | c882a991ccee79ddde6e68d5f1684456a85b5729 (patch) | |
tree | 285724594597b35cdac75617aa452b0cb34c08ec | |
parent | b44c9ac3f5a540f22bde390f471453a54881c5d7 (diff) | |
download | vdr-plugin-streamdev-c882a991ccee79ddde6e68d5f1684456a85b5729.tar.gz vdr-plugin-streamdev-c882a991ccee79ddde6e68d5f1684456a85b5729.tar.bz2 |
added VDR 1.7.11 parental rating support for VTP LSTE command (#555)
-rw-r--r-- | CONTRIBUTORS | 1 | ||||
-rw-r--r-- | HISTORY | 2 | ||||
-rw-r--r-- | server/connectionVTP.c | 26 |
3 files changed, 27 insertions, 2 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 38882e3..9f5e570 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -125,6 +125,7 @@ Artem Makhutov Alwin Esch for adding XBMC support by extending VTP capabilities + for adding VDR 1.7.11 parental rating support for VTP LSTE command BBlack for reporting that updating recordings list on CmdPLAY is a bad idea @@ -1,6 +1,8 @@ VDR Plugin 'streamdev' Revision History --------------------------------------- +- added VDR 1.7.11 parental rating support for VTP LSTE command (thanks to + Alwin Esch) - added Lithuanian translation (thanks to Valdemaras Pipiras) - fixed missing virtual destructor for cTSRemux - added defines for large file support to Makefile as required by VDR 1.7.4+ 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: |