diff options
| author | Christian Wieninger <cwieninger (at) gmx (dot) de> | 2007-05-03 18:17:16 +0000 |
|---|---|---|
| committer | Christian Wieninger <cwieninger (at) gmx (dot) de> | 2007-05-03 18:17:16 +0000 |
| commit | 3a0ab012c018c1d5093c8cdc89537a9d4467afb0 (patch) | |
| tree | d8b999b85e95f725f2dfba00fdf2eae91e9b50d8 /timers.cpp | |
| parent | 69d1982a650657a4cd2d17b818c3d7bdc3e969e4 (diff) | |
| download | vdr-plugin-live-3a0ab012c018c1d5093c8cdc89537a9d4467afb0.tar.gz vdr-plugin-live-3a0ab012c018c1d5093c8cdc89537a9d4467afb0.tar.bz2 | |
- EPG pages now display record.png or record_timer.png depending on an existing timer
- If record_timer.png is displayed one can now edit the timer for an event
Diffstat (limited to 'timers.cpp')
| -rw-r--r-- | timers.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -204,6 +204,21 @@ string TimerManager::GetError( TimerPair const& timerData ) return ""; } +const cTimer* TimerManager::GetTimer(tEventID eventid, tChannelID channelid) +{ + cMutexLock timersLock( &LiveTimerManager() ); + SortedTimers& timers = LiveTimerManager().GetTimers(); + + for ( SortedTimers::iterator timer = timers.begin(); timer != timers.end(); ++timer ) + if (timer->Channel() && timer->Channel()->GetChannelID() == channelid) + { + if (!timer->Event()) timer->SetEventFromSchedule(); + if (timer->Event() && timer->Event()->EventID() == eventid) + return &*timer; + } + return NULL; +} + TimerManager& LiveTimerManager() { static TimerManager instance; |
