<%pre> #include #include #include #include #include "setup.h" #include "tools.h" using namespace vdrlive; <%args> int channel = -1; <{ cSchedulesLock schedulesLock; const cSchedules* schedules = cSchedules::Schedules(schedulesLock); cChannel* Channel; ReadLock channelsLock( Channels ); if (channelsLock) { if (channel > 0) { Channel = Channels.GetByNumber(channel); } else { Channel = Channels.Get(Channels.GetNextNormal(-1)); } }> VDR Live - <$ tr("Schedule") $>
VDR Live! <& menu >
Name() ?>
<& channels_widget name=("channel") &>
<{ if (Channel) { const cSchedule *Schedule = schedules->GetSchedule(Channel); if (Schedule) { }> <{ bool active_line = false; std::string current_day = ""; const cEvent* PresentEvent = Schedule->GetPresentEvent(); time_t now = time(NULL) - ::Setup.EPGLinger * 60; for (const cEvent *Event = Schedule->Events()->First(); Event; Event = Schedule->Events()->Next(Event)) { if (Event->EndTime() <= now && Event != PresentEvent) continue; active_line = !active_line; 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()) : ""); std::string day(Event->StartTime() ? FormatDateTime(tr("%A, %b %d %Y"), Event->StartTime()) : ""); if (current_day != day) { current_day = day; }> <{ } }> "> <{ } }>
<$ current_day $>
<$ start $> - <$ end $> <$ title $>
<$ short_description $>
 
<{ } else { }> Kein Schedule für Channel <$ Channel->Number() $> <{ } } else { }> Kein Channel mit der Nummer <$ channel $> <{ } } }>