radio-plugin: schow current running song in lcdproc

Message ID 2a954dbc0510090536g5364c795m@mail.gmail.com
State New
Headers

Commit Message

Joachim Wilke Oct. 9, 2005, 12:36 p.m. UTC
  Hi everyone,

attached is a patch, that enables the radio plugin to show the current
running songtitle and artist on an attached lcd or any other facility
that listens to cStatus::OsdProgramme events.

Patch works at least for radio-0.0.8c.

Joachim.
  

Patch

diff -up radio-0.0.8c.o/radiotransfer.c radio-0.0.8c/radiotransfer.c
--- radio-0.0.8c.o/radiotransfer.c	Mon Sep 12 15:50:22 2005
+++ radio-0.0.8c/radiotransfer.c	Sun Oct  9 14:26:56 2005
@@ -8,6 +8,7 @@ 
 
 #include "radiotransfer.h"
 #include <vdr/remote.h>
+#include <vdr/status.h>
 #include "i18n.h"
 
 #define TRANSFERBUFSIZE MEGABYTE(2)
@@ -830,6 +833,10 @@  void cRadioTextOsd::ShowText(void)
 		}
 	    // + RT-Plus = 2 rows
 	    if ((S_RtOsdTags == 1 && RT_PlusShow) || S_RtOsdTags >= 2) {
+
+		// announce current title and artist as current running for lcdproc and others
+    		cStatus::MsgOsdProgramme (time(NULL), RTP_Title, RTP_Artist, 0, NULL, NULL);					    
+		
 		sprintf(stext[1], "> %s  %s", tr("Title  :"), RTP_Title);
    		osd->DrawText(3, 6+yoffset+fheight*(ii++), stext[1], rt_color[S_RtFgCol], clrTransparent, ftext, Setup.OSDWidth-4, ftext->Height());
    		//osd->DrawText(120, 6+yoffset+fheight*(ii++), RTP_Title, rt_color[S_RtFgCol], clrTransparent, ftext, Setup.OSDWidth-4, ftext->Height());