<%pre> #include #include #include #include #include #include "setup.h" #include "tools.h" using namespace vdrlive; <%args> <{ cSchedulesLock schedulesLock; const cSchedules* Schedules = cSchedules::Schedules(schedulesLock); }> VDR-Live - <$ tr("What's on now?") $>
VDR Live! <& menu >
<$ tr("What's running at") $> <$ FormatDateTime(tr("%I:%M %p"), time(0)) $>
<{ ReadLock channelsLock( Channels ); if (channelsLock) { for (cChannel *Channel = Channels.First(); Channel && Channel->Number() <= LiveSetup().GetLastChannel(); Channel = Channels.Next(Channel)) { if (!Channel->GroupSep()) { const cSchedule *Schedule = Schedules->GetSchedule(Channel); if (Schedule) { const cEvent *Event = Schedule->GetPresentEvent(); if (Event) { std::string title(Event->Title() ? Event->Title() : ""); std::string short_description(Event->ShortText() ? Event->ShortText() : ""); std::string description(Event->Description() ? Event->Description() : ""); std::string start(Event->StartTime() ? FormatDateTime(tr("%I:%M %p"), Event->StartTime()) : ""); std::string end(Event->EndTime() ? FormatDateTime(tr("%I:%M %p"), Event->EndTime()) : ""); }> <& event_widget title=(title) short_description=(short_description) description=(description) channel_name=(Channel->Name()) start=(start) end=(end)> <{ } } } } } }>