diff options
author | Joerg Bornkessel <hd_brummy@gentoo.org> | 2006-02-27 23:30:40 +0000 |
---|---|---|
committer | Joerg Bornkessel <hd_brummy@gentoo.org> | 2006-02-27 23:30:40 +0000 |
commit | baa46c41b99d873e518d992fd904b78f24eea482 (patch) | |
tree | fd64d8ac886a808a95165d2a494e763294bb93bb /media-plugins/vdr-graphlcd/files | |
parent | Bump 2.0.53 and 2.0.54 dependencies to >=dev-lang/python-2.3 due to usage of ... (diff) | |
download | historical-baa46c41b99d873e518d992fd904b78f24eea482.tar.gz historical-baa46c41b99d873e518d992fd904b78f24eea482.tar.bz2 historical-baa46c41b99d873e518d992fd904b78f24eea482.zip |
patch added to support vdr-radio, vdr-lcr on glcd; fixed pkg_preinst call; thx to C.Leuschen for the patch
Package-Manager: portage-2.0.54
Diffstat (limited to 'media-plugins/vdr-graphlcd/files')
-rw-r--r-- | media-plugins/vdr-graphlcd/files/0.1.2/radiotext-lcr-service.diff | 125 |
1 files changed, 125 insertions, 0 deletions
diff --git a/media-plugins/vdr-graphlcd/files/0.1.2/radiotext-lcr-service.diff b/media-plugins/vdr-graphlcd/files/0.1.2/radiotext-lcr-service.diff new file mode 100644 index 000000000000..45c7d46fc2e7 --- /dev/null +++ b/media-plugins/vdr-graphlcd/files/0.1.2/radiotext-lcr-service.diff @@ -0,0 +1,125 @@ +--- state.h.orig 2005-05-07 11:23:42.000000000 +0200 ++++ state.h 2006-02-13 17:23:23.000000000 +0100 +@@ -120,4 +120,22 @@ + tVolumeState GetVolumeState(); + }; + ++// Radiotext ++struct RadioTextService_v1_0 { ++ int rds_info; ++ int rds_pty; ++ char *rds_text; ++ char *rds_title; ++ char *rds_artist; ++ struct tm *title_start; ++}; ++ ++// LcrData ++struct LcrService_v1_0 { ++ cString destination; ++ cString price; ++ cString pulse; ++}; ++ + #endif ++ + +--- state.c.orig 2005-05-07 11:23:42.000000000 +0200 ++++ state.c 2006-02-27 18:55:41.000000000 +0100 +@@ -15,6 +15,7 @@ + #include "strfct.h" + + #include <vdr/i18n.h> ++#include <vdr/plugin.h> + + #include "compat.h" + +@@ -568,6 +569,8 @@ + + void cGraphLCDState::GetProgramme() + { ++ bool ptitle = false; ++ + mutex.Lock(); + #if VDRVERSNUM < 10300 + const cEventInfo * present = NULL, * following = NULL; +@@ -584,8 +587,10 @@ + { + event.presentTime = present->GetTime(); + event.presentTitle = ""; +- if (!isempty(present->GetTitle())) ++ if (!isempty(present->GetTitle())) { + event.presentTitle = present->GetTitle(); ++ ptitle = true; ++ } + event.presentSubtitle = ""; + if (!isempty(present->GetSubtitle())) + event.presentSubtitle = present->GetSubtitle(); +@@ -618,8 +623,10 @@ + { + event.presentTime = present->StartTime(); + event.presentTitle = ""; +- if (!isempty(present->Title())) ++ if (!isempty(present->Title())) { + event.presentTitle = present->Title(); ++ ptitle = true; ++ } + event.presentSubtitle = ""; + if (!isempty(present->ShortText())) + event.presentSubtitle = present->ShortText(); +@@ -639,6 +646,55 @@ + } + #endif + mutex.Unlock(); ++ ++#if VDRVERSNUM >= 10330 ++ { // get&display Radiotext ++ cPlugin *p; ++ p = cPluginManager::CallFirstService("RadioTextService-v1.0", NULL); ++ if (p) { ++ RadioTextService_v1_0 rtext; ++ if (cPluginManager::CallFirstService("RadioTextService-v1.0", &rtext)) { ++ if (rtext.rds_info == 2 && strstr(rtext.rds_title, "---") == NULL) { ++ char rtpinfo[2][65], rtstr[140]; ++ strcpy(rtpinfo[0], rtext.rds_title); ++ strcpy(rtpinfo[1], rtext.rds_artist); ++ sprintf(rtstr, "%02d:%02d %s | %s", rtext.title_start->tm_hour, rtext.title_start->tm_min, trimright(rtpinfo[0]), trimright(rtpinfo[1])); ++ ptitle ? event.presentSubtitle = rtstr : event.presentTitle = rtstr; ++ } ++ else if (rtext.rds_info > 0) { ++ char rtstr[65]; ++ strcpy(rtstr, rtext.rds_text); ++ ptitle ? event.presentSubtitle = trimright(rtstr) : event.presentTitle = trimright(rtstr); ++ } ++ } ++ } ++ } ++#endif ++ ++ ++#if VDRVERSNUM >= 10330 ++ { // get&display LcrData ++ cPlugin *p; ++ p = cPluginManager::CallFirstService("LcrService-v1.0", NULL); ++ if (p) ++ { ++ LcrService_v1_0 lcrData; ++ if (cPluginManager::CallFirstService("LcrService-v1.0", &lcrData)) ++ { ++ if ( strstr( lcrData.destination, "---" ) == NULL ) ++ { ++ char lcrStringParts[3][25], lcrString[100]; ++ strcpy( lcrStringParts[0], (const char *)lcrData.destination ); ++ strcpy( lcrStringParts[1], (const char *)lcrData.price ); ++ strcpy( lcrStringParts[2], (const char *)lcrData.pulse ); ++ sprintf(lcrString, "%s | %s", trimright(lcrStringParts[1]), trimright(lcrStringParts[2])); ++ event.presentTitle = trimright(lcrStringParts[0]); ++ event.presentSubtitle = trimright(lcrString); ++ } ++ } ++ } ++ } ++#endif + } + + tChannelState cGraphLCDState::GetChannelState() |