[vdr-plugin-radio] 01/03: Imported Upstream version 1.0.0

Tobias Grimm tiber-guest at moszumanska.debian.org
Mon Feb 9 18:54:40 UTC 2015


This is an automated email from the git hooks/post-receive script.

tiber-guest pushed a commit to branch master
in repository vdr-plugin-radio.

commit 5674e6feb1164d20fcc330f5d0061b80fd37cd5a
Author: etobi <git at e-tobi.net>
Date:   Mon Feb 9 19:49:49 2015 +0100

    Imported Upstream version 1.0.0
---
 HISTORY                                            |   6 +
 config/mpegstill/radio-OnAir1080.mpg               | Bin 0 -> 135384 bytes
 config/mpegstill/radio-Red1080.mpg                 | Bin 0 -> 109074 bytes
 config/mpegstill/radio-Tubes1080.mpg               | Bin 0 -> 138345 bytes
 config/mpegstill/radio.mpg                         |   2 +-
 config/scripts/radioinfo-1113-354                  |   4 +-
 ...{radioinfo-1113-354 => radioinfo-1113-354.utf8} |   0
 config/scripts/radioinfo-7-304                     |   3 +-
 .../{radioinfo-7-304 => radioinfo-7-304.utf8}      |   0
 inforx.c                                           |   4 +-
 po/de_DE.po                                        |   8 +-
 po/fi_FI.po                                        |   8 +-
 po/fr_FR.po                                        |   8 +-
 po/hu_HU.po                                        |   8 +-
 po/it_IT.po                                        |   8 +-
 radio.c                                            |   7 +-
 radioaudio.c                                       |  13 +-
 radioaudio.h                                       |   1 +
 radioepg.c                                         | 133 +++++++++++++++------
 radioepg.h                                         |  13 +-
 radiotools.c                                       |   2 +-
 21 files changed, 158 insertions(+), 70 deletions(-)

diff --git a/HISTORY b/HISTORY
index 2f98aad..f6aaa5e 100644
--- a/HISTORY
+++ b/HISTORY
@@ -1,5 +1,11 @@
 VDR Plugin 'radio' Revision History
 -----------------------------------
+2013-05-31: Version 1.0.0
+            U.Hanke <egal at gmx.info>
+- Security-patch formatstrings, thanks to Tobias Grimm
+- Update EPG for MusicChoice, thanks to p_body at vdr-portal
+- Add Source-charset
+- some UTF-8 script cleanups
 
 2013-02-10: Version 0.9.1
             U.Hanke <egal at gmx.info>
diff --git a/config/mpegstill/radio-OnAir1080.mpg b/config/mpegstill/radio-OnAir1080.mpg
new file mode 100644
index 0000000..8fa6112
Binary files /dev/null and b/config/mpegstill/radio-OnAir1080.mpg differ
diff --git a/config/mpegstill/radio-Red1080.mpg b/config/mpegstill/radio-Red1080.mpg
new file mode 100644
index 0000000..03f0162
Binary files /dev/null and b/config/mpegstill/radio-Red1080.mpg differ
diff --git a/config/mpegstill/radio-Tubes1080.mpg b/config/mpegstill/radio-Tubes1080.mpg
new file mode 100644
index 0000000..e65cf16
Binary files /dev/null and b/config/mpegstill/radio-Tubes1080.mpg differ
diff --git a/config/mpegstill/radio.mpg b/config/mpegstill/radio.mpg
index 4165c23..a9a53d4 120000
--- a/config/mpegstill/radio.mpg
+++ b/config/mpegstill/radio.mpg
@@ -1 +1 @@
-rtextUnten-kleo2-live.mpg
\ No newline at end of file
+radio-Tubes1080.mpg
\ No newline at end of file
diff --git a/config/scripts/radioinfo-1113-354 b/config/scripts/radioinfo-1113-354
index 00a214b..068aeeb 100755
--- a/config/scripts/radioinfo-1113-354
+++ b/config/scripts/radioinfo-1113-354
@@ -7,7 +7,9 @@ Name="ffn digital [www.ffn.de]"
 ### 
 
 # get...
-wget -q --tries=2 --timeout=5 -O /tmp/playlist "http://www.ffn.de/musik/playlist.html"
+wget -q --tries=2 --timeout=5 -O /tmp/playlist.utf8 "http://www.ffn.de/musik/playlist.html"
+iconv -c -s -f UTF8 -t ISO8859-1 /tmp/playlist.utf8 -o /tmp/playlist
+
 # grep actual song
 all=`grep -A6 'wird gerade gespielt' /tmp/playlist`
 
diff --git a/config/scripts/radioinfo-1113-354 b/config/scripts/radioinfo-1113-354.utf8
similarity index 100%
copy from config/scripts/radioinfo-1113-354
copy to config/scripts/radioinfo-1113-354.utf8
diff --git a/config/scripts/radioinfo-7-304 b/config/scripts/radioinfo-7-304
index a92422e..db123ae 100755
--- a/config/scripts/radioinfo-7-304
+++ b/config/scripts/radioinfo-7-304
@@ -7,7 +7,8 @@ Name="Rockantenne [www.rockantenne.de]"
 ### 
 
 # get...
-wget -q --tries=2 --timeout=5 -O /tmp/playlist "http://www.rockantenne.de/webplayer/#playlist"
+wget -q --tries=2 --timeout=5 -O /tmp/playlist.utf8 "http://www.rockantenne.de/webplayer/#playlist"
+iconv -c -s -f UTF8 -t ISO8859-1 /tmp/playlist.utf8 -o /tmp/playlist
 
 # last Artist/Title
 all=`grep -m1 -A4 'Rock Nonstop' /tmp/playlist`
diff --git a/config/scripts/radioinfo-7-304 b/config/scripts/radioinfo-7-304.utf8
similarity index 100%
copy from config/scripts/radioinfo-7-304
copy to config/scripts/radioinfo-7-304.utf8
diff --git a/inforx.c b/inforx.c
index 871c338..ea0f492 100644
--- a/inforx.c
+++ b/inforx.c
@@ -119,8 +119,8 @@ int info_request(int chantid, int chanapid) {
     xhtml2text(artist);
     xhtml2text(titel);
 	if (strcmp(RTP_Artist, artist) != 0 || strcmp(RTP_Title, titel) != 0) {
-	    snprintf(RTP_Artist, RT_MEL, artist);
-		snprintf(RTP_Title, RT_MEL, titel);
+	    snprintf(RTP_Artist, RT_MEL, "%s", artist);
+		snprintf(RTP_Title, RT_MEL, "%s", titel);
 		RTP_Starttime = time(NULL);
 	    sprintf(temp[0], "%s  ok :-)", ident);
 	    struct tm *ts = localtime_r(&RTP_Starttime, &tm_store);
diff --git a/po/de_DE.po b/po/de_DE.po
index 30aea96..5ad188f 100644
--- a/po/de_DE.po
+++ b/po/de_DE.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: VDR 1.5.7\n"
 "Report-Msgid-Bugs-To: <see README>\n"
-"POT-Creation-Date: 2013-02-10 16:46+0100\n"
+"POT-Creation-Date: 2013-05-31 20:15+0200\n"
 "PO-Revision-Date: 2007-09-20 15:30+0200\n"
 "Last-Translator: Uwe Hanke <egal at egal-vdr.de>\n"
 "Language-Team: <vdr at linuxtv.org>\n"
@@ -88,9 +88,6 @@ msgstr "Interpret :"
 msgid "Records"
 msgstr "Archiv"
 
-msgid "with <0>"
-msgstr "mit  <0>"
-
 msgid "Rass-Image(s) saved from Archiv "
 msgstr "Rass-Bild(er)speicherung von Archiv "
 
@@ -348,3 +345,6 @@ msgstr "RDSText Rass-Funktion"
 
 msgid "External Info-Request"
 msgstr "Externe Info-Abfrage"
+
+#~ msgid "with <0>"
+#~ msgstr "mit  <0>"
diff --git a/po/fi_FI.po b/po/fi_FI.po
index 1814fd9..7c84cde 100644
--- a/po/fi_FI.po
+++ b/po/fi_FI.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: VDR 1.5.7\n"
 "Report-Msgid-Bugs-To: <see README>\n"
-"POT-Creation-Date: 2013-02-10 16:46+0100\n"
+"POT-Creation-Date: 2013-05-31 20:15+0200\n"
 "PO-Revision-Date: 2007-08-13 19:21+0200\n"
 "Last-Translator: Rolf Ahrenberg <rahrenbe at cc.hut.fi>\n"
 "Language-Team: <vdr at linuxtv.org>\n"
@@ -88,9 +88,6 @@ msgstr "Esitt
 msgid "Records"
 msgstr "Rass-tallenteet"
 
-msgid "with <0>"
-msgstr "'0'-n�pp�imell�"
-
 msgid "Rass-Image(s) saved from Archiv "
 msgstr ""
 
@@ -349,3 +346,6 @@ msgstr "K
 
 msgid "External Info-Request"
 msgstr ""
+
+#~ msgid "with <0>"
+#~ msgstr "'0'-n�pp�imell�"
diff --git a/po/fr_FR.po b/po/fr_FR.po
index 3bd82e5..e8e6493 100644
--- a/po/fr_FR.po
+++ b/po/fr_FR.po
@@ -6,7 +6,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: VDR 1.5.7\n"
 "Report-Msgid-Bugs-To: <see README>\n"
-"POT-Creation-Date: 2013-02-10 16:46+0100\n"
+"POT-Creation-Date: 2013-05-31 20:15+0200\n"
 "PO-Revision-Date: 2007-09-14 16:12+0200\n"
 "Last-Translator: Micha�l Nival, Patrice Staudt\n"
 "Language-Team: <vdr at linuxtv.org>\n"
@@ -87,9 +87,6 @@ msgstr "Artiste :"
 msgid "Records"
 msgstr "Archive"
 
-msgid "with <0>"
-msgstr "avec <0>"
-
 msgid "Rass-Image(s) saved from Archiv "
 msgstr "Rass-image(2) saugarde de l'archive"
 
@@ -348,3 +345,6 @@ msgstr "Fonction Rass de RDSTexte"
 
 msgid "External Info-Request"
 msgstr "Demande d'infos externe"
+
+#~ msgid "with <0>"
+#~ msgstr "avec <0>"
diff --git a/po/hu_HU.po b/po/hu_HU.po
index 5b44f09..5cf5fce 100644
--- a/po/hu_HU.po
+++ b/po/hu_HU.po
@@ -6,7 +6,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: VDR 1.5.7\n"
 "Report-Msgid-Bugs-To: <see README>\n"
-"POT-Creation-Date: 2013-02-10 16:46+0100\n"
+"POT-Creation-Date: 2013-05-31 20:15+0200\n"
 "PO-Revision-Date: 2007-08-13 19:21+0200\n"
 "Last-Translator: F�ley Istv�n\n"
 "Language-Team: <vdr at linuxtv.org>\n"
@@ -87,9 +87,6 @@ msgstr "El
 msgid "Records"
 msgstr "Arch�vum"
 
-msgid "with <0>"
-msgstr "<0> bill."
-
 msgid "Rass-Image(s) saved from Archiv "
 msgstr "Rass-k�p(ek) elmentve az arch�vumb�l"
 
@@ -348,3 +345,6 @@ msgstr "RDS Rass funkci
 
 msgid "External Info-Request"
 msgstr ""
+
+#~ msgid "with <0>"
+#~ msgstr "<0> bill."
diff --git a/po/it_IT.po b/po/it_IT.po
index 4980a11..eab61d8 100644
--- a/po/it_IT.po
+++ b/po/it_IT.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: VDR 1.5.7\n"
 "Report-Msgid-Bugs-To: <see README>\n"
-"POT-Creation-Date: 2013-02-10 16:46+0100\n"
+"POT-Creation-Date: 2013-05-31 20:15+0200\n"
 "PO-Revision-Date: 2008-06-15 22:39+0100\n"
 "Last-Translator: Diego Pierotto <vdr-italian at tiscali.it>\n"
 "Language-Team:  <vdr at linuxtv.org>\n"
@@ -88,9 +88,6 @@ msgstr "Artista :"
 msgid "Records"
 msgstr "Archivio"
 
-msgid "with <0>"
-msgstr "con <0>"
-
 msgid "Rass-Image(s) saved from Archiv "
 msgstr "Immagini Rass salvate dall'Archivio"
 
@@ -348,3 +345,6 @@ msgstr "Funzione Rass testo RDS"
 
 msgid "External Info-Request"
 msgstr "Richiesta info esterna"
+
+#~ msgid "with <0>"
+#~ msgstr "con <0>"
diff --git a/radio.c b/radio.c
index c52c065..d01fa8b 100644
--- a/radio.c
+++ b/radio.c
@@ -20,7 +20,7 @@
     #error This version of radio-plugin requires vdr >= 1.7.37
 #endif
 
-static const char *VERSION        = "0.9.1";
+static const char *VERSION        = "1.0.0";
 static const char *DESCRIPTION    = trNOOP("Radio Background-Image/RDS-Text");
 static const char *MAINMENUENTRY  = trNOOP("Show RDS-Radiotext");
 char *ConfigDir;
@@ -58,6 +58,7 @@ int RT_Info, RT_Index, RT_PTY;
 time_t RTP_Starttime;
 bool RT_OsdTO = false, RTplus_Osd = false, RT_ReOpen = false;
 int RT_OsdTOTemp = 0, Radio_CA = 0;
+int RT_Charset = 0;    // 0= ISO-8859-1, 1= UTF8, 2= ..
 // RadioCheck
 const cChannel *chan;
 int IsRadioOrReplay;
@@ -144,7 +145,7 @@ void cRadioCheck::Action(void)
                     int chtid = chan->Tid();
                     // Kanal-EPG PresentEvent
                     if (chan->Apid(0) > 0 && (chtid == PREMIERERADIO_TID || chtid == KDRADIO_TID
-                                              || chtid == UMRADIO_TID1 || chtid == UMRADIO_TID2)) {
+                                              || chtid == UMRADIO_TID1 || chtid == UMRADIO_TID2 || chtid == UMRADIO_TID3 || chtid == UMRADIO_TID4 || chtid == UMRADIO_TID5)) {
                         cSchedulesLock schedLock;
                         const cSchedules *scheds = cSchedules::Schedules(schedLock);
                         if (scheds != NULL) {
@@ -157,7 +158,7 @@ void cRadioCheck::Action(void)
                                     else if (chtid == KDRADIO_TID)      // Kabel Deutschland
                                         InfoTimeout = epg_kdg(present->Description(), present->StartTime(), present->EndTime());
                                     else                                // Unity Media Kabel
-                                        InfoTimeout = epg_unitymedia(present->Title(), present->Description(), present->StartTime(), present->EndTime());
+                                        InfoTimeout = epg_unitymedia(present->Description(), present->StartTime(), present->EndTime());
                                     InfoRequest = true;
                                     }
                                 else
diff --git a/radioaudio.c b/radioaudio.c
index e7f1f3e..8c6a2dc 100644
--- a/radioaudio.c
+++ b/radioaudio.c
@@ -1381,6 +1381,7 @@ void cRadioAudio::EnableRadioTextProcessing(const char *Titel, int apid, bool re
         sprintf(RTP_Title, "---");
         sprintf(RTP_Artist, "---");
         RTP_Starttime = time(NULL);
+        RT_Charset = 0;
         //
         RDS_PSShow = false;
         RDS_PSIndex = 0;
@@ -1525,7 +1526,7 @@ cBitmap cRadioTextOsd::bok(bok_xpm);
 cBitmap cRadioTextOsd::pageE(pageE_xpm);
 
 cRadioTextOsd::cRadioTextOsd()
-    : cCharSetConv("ISO-8859-1")
+    : cCharSetConv((RT_Charset == 0) ? "ISO-8859-1" : NULL)
 {
     RadioTextOsd = this;
     osd = NULL;
@@ -1868,7 +1869,7 @@ void cRadioTextOsd::RassOsdTip(void)
         qosd->DrawEllipse(92, 29+(2*fh), 97, 29+(2*fh)+5, 0x00000000, -4);
 		qosd->DrawRectangle(5, 29, 92, 29, fcolor);
         qosd->DrawText(5, 29+4, tr("Records"), fcolor, clrTransparent, ftext, 97, fh);
-        qosd->DrawText(5, 29+fh+4, tr("with <0>"), fcolor, clrTransparent, ftext, 97, fh);
+        qosd->DrawText(5, 29+fh+4, ".. <0>", fcolor, clrTransparent, ftext, 97, fh);
         qosd->Flush();
         }
 }
@@ -2166,7 +2167,7 @@ eOSState cRadioTextOsd::ProcessKey(eKeys Key)
 
 cRTplusOsd::cRTplusOsd(void)
    : cOsdMenu(RTp_Titel, 3, 12)
-   , cCharSetConv("ISO-8859-1")
+   , cCharSetConv((RT_Charset == 0) ? "ISO-8859-1" : NULL)
 {
     RTplus_Osd = false;
     
@@ -2590,11 +2591,11 @@ eOSState cRTplusOsd::ProcessKey(eKeys Key)
 
 cRTplusList::cRTplusList(int Typ)
    : cOsdMenu(RTp_Titel, 4)
-   , cCharSetConv("ISO-8859-1")
+   , cCharSetConv((RT_Charset == 0) ? "ISO-8859-1" : NULL)
 {
     typ = Typ;
     refresh = false;
-    
+
     Load();
     Display();
 }
@@ -2610,7 +2611,7 @@ void cRTplusList::Load(void)
     struct tm *ts, tm_store;
     int ind, lfd = 0;
     char ctitle[80];
-    
+
     ts = localtime_r(&rtp_content.start, &tm_store);
     switch (typ) {
         case 0:  snprintf(text, sizeof(text), "-- %s (max. %d) --", tr("last seen Radiotext"), 2*MAX_RTPC);
diff --git a/radioaudio.h b/radioaudio.h
index cfa37e2..90c9cae 100644
--- a/radioaudio.h
+++ b/radioaudio.h
@@ -50,6 +50,7 @@ extern bool RT_OsdTO, RTplus_Osd, RT_ReOpen;
 extern int Radio_CA;
 extern int RT_OsdTOTemp;
 extern int IsRadioOrReplay;
+extern int RT_Charset;
 // Info
 extern bool InfoRequest;
 
diff --git a/radioepg.c b/radioepg.c
index 281e4bb..69bfff0 100644
--- a/radioepg.c
+++ b/radioepg.c
@@ -104,8 +104,8 @@ int epg_premiere(const char *epgtitle, const char *epgdescr, time_t epgstart, ti
     int nextevent = epgend - time(NULL);
 
     if (strcmp(RTP_Artist, artist)!=0 || strcmp(RTP_Title, titel)!=0) {
-        snprintf(RTP_Artist, RT_MEL, artist);
-        snprintf(RTP_Title, RT_MEL, titel);
+        snprintf(RTP_Artist, RT_MEL, "%s", artist);
+        snprintf(RTP_Title, RT_MEL, "%s", titel);
         RTP_Starttime = epgstart;
         struct tm *ts = localtime_r(&RTP_Starttime, &tm_store);
         if (++rtp_content.rt_Index >= 2*MAX_RTPC) 
@@ -201,8 +201,8 @@ int epg_kdg(const char *epgdescr, time_t epgstart, time_t epgend)
     int nextevent = epgend - time(NULL);
 
     if (strcmp(RTP_Artist, artist)!=0 || strcmp(RTP_Title, titel)!=0) {
-        snprintf(RTP_Artist, RT_MEL, artist);
-        snprintf(RTP_Title, RT_MEL, titel);
+        snprintf(RTP_Artist, RT_MEL, "%s", artist);
+        snprintf(RTP_Title, RT_MEL, "%s", titel);
         RTP_Starttime = epgstart;
         struct tm *ts = localtime_r(&RTP_Starttime, &tm_store);
         if (++rtp_content.rt_Index >= 2*MAX_RTPC) 
@@ -235,55 +235,119 @@ int epg_kdg(const char *epgdescr, time_t epgstart, time_t epgend)
     return (nextevent < 0) ? 10 : nextevent+2; 
 }
 
-
 // Unity Media - Music Choice, Kabel
-int epg_unitymedia(const char *epgtitle, const char *epgdescr, time_t epgstart, time_t epgend) 
+int epg_unitymedia(const char *epgdescr, time_t epgstart, time_t epgend) 
 {
     int i;
-    const char *p1, *p2;
-    char titel[2*RT_MEL], artist[2*RT_MEL];
+    const char *p;
+    char artist[RT_MEL], titel[RT_MEL], album[RT_MEL], jahr[RT_MEL], komp[RT_MEL];
     struct tm tm_store;
 
     // EPG not actual
-    if (epgtitle == NULL || epgdescr == NULL) {
+    if (epgdescr == NULL) {
         dsyslog("radio: epg_unitymedia called, no title or description, nextCall in 5s\n"); 
         return 5;
         }
-        
-    // Title
-    strcpy(titel, epgtitle);
-    
-    // Interpet+Album, no delimiter between title, artist + album :-(
-    p1 = strstr(epgdescr, titel);
-    if (p1 != NULL) {
-        p1 += strlen(titel) + 1;
-        p2 = strstr(epgdescr, UMEPG_SUFFIX);
-        if ((p2-p1) > 2) {
-            p2 -= 2;
+
+    // Titel
+    p = strstr(epgdescr, UMEPG_TITEL);
+    if (p != NULL) {
+        p += strlen(UMEPG_TITEL);
+        i = 1;
+        while (*++p!='\n' && *p!='\0' && i<(RT_MEL-1)) ++i;
+        memcpy(titel, p-i, i);
+        titel[i] = '\0';
+        }
+    else  {
+        // Kein titel check for Werk
+        p = strstr(epgdescr, UMEPG_WERK);
+        if (p != NULL) {
+            p += strlen(UMEPG_WERK);
+            i = 1;
+            while (*++p!='\n' && *p!='\0' && i<(RT_MEL-1)) ++i;
+            memcpy(titel, p-i, i);
+            titel[i] = '\0';
+            }
+        else
+            sprintf(titel, "---");
+        }
+
+    // Interpret
+    p = strstr(epgdescr, UMEPG_ARTIST);
+    if (p != NULL) {
+        p += strlen(UMEPG_ARTIST);
+        i = 1;
+        while (*++p!='\n' && *p!='\0' && i<(RT_MEL-1)) ++i;
+        memcpy(artist, p-i, i);
+        artist[i] = '\0';
+        }
+    else {
+        p = strstr(epgdescr, UMEPG_KOMP);
+        if (p != NULL) {
+            p += strlen(UMEPG_KOMP);
             i = 1;
-            while (++p1<p2 && *p1!='\n' && *p1!='\0' && i<(2*RT_MEL-1)) ++i;
-            memcpy(artist, p1-i, i);
-            artist[i]= '\0';
+            while (*++p!='\n' && *p!='\0' && i<(RT_MEL-1)) ++i;
+            memcpy(artist, p-i, i);
+            artist[i] = '\0';
             }
         else
             sprintf(artist, "---");
         }
+
+    // Komponist
+    p = strstr(epgdescr, UMEPG_KOMP);
+    if (p != NULL) {
+        p += strlen(UMEPG_KOMP);
+        i = 1;
+        while (*++p!='\n' && *p!='\0' && i<(RT_MEL-1)) ++i;
+        memcpy(komp, p-i, i);
+        komp[i] = '\0';
+        }
     else
-        sprintf(artist, "---");
-        
-    
-    int nextevent = epgend - time(NULL);
+        sprintf(komp, "---");
 
+    // Album
+    p = strstr(epgdescr, UMEPG_ALBUM);
+    if (p != NULL) {
+        p += strlen(UMEPG_ALBUM);
+        i = 1;
+        while (*++p!='\n' && *p!='\0' && i<(RT_MEL-1)) ++i;
+        memcpy(album, p-i, i);
+        album[i] = '\0';
+        }
+    else
+        sprintf(album, "---");
+
+    // Jahr
+    p = strstr(epgdescr, UMEPG_JAHR);
+    if (p != NULL) {
+        p += strlen(UMEPG_JAHR);
+        i = 1;
+        while (*++p!='\n' && *p!='\0' && i<(RT_MEL-1)) ++i;
+        memcpy(jahr, p-i, i);
+        jahr[i] = '\0';
+        }
+    else
+        sprintf(jahr, "---");
+
+    int nextevent = epgend - time(NULL);
     if (strcmp(RTP_Artist, artist)!=0 || strcmp(RTP_Title, titel)!=0) {
-        snprintf(RTP_Artist, RT_MEL, artist);
-        snprintf(RTP_Title, RT_MEL, titel);
+        snprintf(RTP_Artist, RT_MEL, "%s", artist);
+        snprintf(RTP_Title, RT_MEL, "%s", titel);
         RTP_Starttime = epgstart;
         struct tm *ts = localtime_r(&RTP_Starttime, &tm_store);
         if (++rtp_content.rt_Index >= 2*MAX_RTPC) 
             rtp_content.rt_Index = 0;
-        asprintf(&rtp_content.radiotext[rtp_content.rt_Index], "%02d:%02d  %s von %s",  ts->tm_hour, ts->tm_min, RTP_Title, RTP_Artist);
+        asprintf(&rtp_content.radiotext[rtp_content.rt_Index], "%02d:%02d  %s: %s",  ts->tm_hour, ts->tm_min, RTP_Artist, RTP_Title);
         snprintf(RT_Text[RT_Index], RT_MEL, "%s", rtp_content.radiotext[rtp_content.rt_Index]);
         RT_Index +=1; if (RT_Index >= S_RtOsdRows) RT_Index = 0;
+        if (strcmp(album, "---") != 0) {
+            if (++rtp_content.rt_Index >= 2*MAX_RTPC) 
+                rtp_content.rt_Index = 0;
+            asprintf(&rtp_content.radiotext[rtp_content.rt_Index], "   ... %s (%s)", album, jahr);
+            snprintf(RT_Text[RT_Index], RT_MEL, "%s", rtp_content.radiotext[rtp_content.rt_Index]);
+            RT_Index +=1; if (RT_Index >= S_RtOsdRows) RT_Index = 0;
+            }
         if (++rtp_content.item_Index >= MAX_RTPC)
             rtp_content.item_Index = 0;
         if (rtp_content.item_Index >= 0) {
@@ -291,14 +355,15 @@ int epg_unitymedia(const char *epgtitle, const char *epgdescr, time_t epgstart,
             asprintf(&rtp_content.item_Artist[rtp_content.item_Index], "%s", RTP_Artist);
             asprintf(&rtp_content.item_Title[rtp_content.item_Index], "%s", RTP_Title);
             }
+        RT_Charset = 1; // UTF8 ?!?
         RT_MsgShow = RT_PlusShow = true;
         (RT_Info > 0) ? : RT_Info = 2;
         radioStatusMsg();
         if ((S_Verbose & 0x0f) >= 1)
-            printf("UnityMedia: %s / %s\n", RTP_Artist, RTP_Title);
-        }
-    
-    dsyslog("radio: epg_unitymedia called, nextEvent in %ds\n", nextevent); 
+            printf("UnityMedia-Radio: %s / %s\n", RTP_Artist, RTP_Title);
+    }
+
+    dsyslog("radio: epg_um called, nextEvent in %ds\n", nextevent); 
     return (nextevent < 0) ? 10 : nextevent+2; 
 }
 
diff --git a/radioepg.h b/radioepg.h
index ac98aea..56318e6 100644
--- a/radioepg.h
+++ b/radioepg.h
@@ -42,9 +42,20 @@ int epg_kdg(const char *epgdescr, time_t epgstart, time_t epgend);
 /* Unity Media, Kabel */
 #define UMRADIO_TID1 111
 #define UMRADIO_TID2 131
+#define UMRADIO_TID3 141
+#define UMRADIO_TID4 181 
+#define UMRADIO_TID5 191
+
 // EPG-Info
 #define UMEPG_SUFFIX "Music Choice bei Unitymedia"
-int epg_unitymedia(const char *epgtitle, const char *epgdescr, time_t epgstart, time_t epgend);
+#define UMEPG_ARTIST "Interpret: "
+#define UMEPG_TITEL "Titel: "
+#define UMEPG_ALBUM "Album: "
+#define UMEPG_JAHR "Jahr: "  
+#define UMEPG_WERK "Werk: "
+#define UMEPG_KOMP "Komponist: "
+
+int epg_unitymedia(const char *epgdescr, time_t epgstart, time_t epgend);
 
 
 #endif
diff --git a/radiotools.c b/radiotools.c
index ee45e55..8ca9c19 100644
--- a/radiotools.c
+++ b/radiotools.c
@@ -222,7 +222,7 @@ char *audiobitrate(const unsigned char *data)
                             break;
                 case 0x02:  asprintf(&temp, "V2");
                             break;
-                case 0x03:  asprintf(&temp, bitrates[3-layer][data[hl+2] >> 4]);
+                case 0x03:  asprintf(&temp, "%s", bitrates[3-layer][data[hl+2] >> 4]);
                             break;
                 }
             }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vdr-dvb/vdr-plugin-radio.git



More information about the pkg-vdr-dvb-changes mailing list