<%pre> #include #include #include #include #include #include "setup.h" #include "tools.h" using namespace vdrlive; <%args> type = "now"; <{ cSchedulesLock schedulesLock; const cSchedules* Schedules = cSchedules::Schedules(schedulesLock); std::string head(tr("What's running at")+FormatDateTime(tr("%I:%M %p"), time(0))); }> VDR-Live - <$ head $>
VDR Live! <& menu >
<& pageelems.header_box content=(head) &> <{ 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 = (type == "now" ? Schedule->GetPresentEvent() : Schedule->GetFollowingEvent()); if (Event) { std::string title(Event->Title() ? Event->Title() : ""); std::string channel_name(Channel->Name()); 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()) : ""); std::string start_h(FormatDateTime( "%H", Event->StartTime())); std::string end_h(FormatDateTime( "%H", Event->EndTime())); std::string start_m(FormatDateTime( "%M", Event->StartTime())); std::string end_m(FormatDateTime( "%M", Event->EndTime())); }>
<$ channel_name $>
border="0"/>
<$ start $> - <$ end $>
<$ title $>
<$ short_description $>
<$ description $>
<{ } } } } } }>