radio-plugin: schow current running song in lcdproc
Commit Message
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.
@@ -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());