mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
The status changes of EPG events are now logged for all channels that have timers
This commit is contained in:
parent
9887c0765b
commit
457f5dd14c
1
HISTORY
1
HISTORY
@ -4421,3 +4421,4 @@ Video Disk Recorder Revision History
|
||||
- Reduced the number of events to actually check when setting events to timers.
|
||||
- cMenuEditIntItem now checks the given value and forces it to be between the
|
||||
given min and max limits.
|
||||
- The status changes of EPG events are now logged for all channels that have timers.
|
||||
|
12
channels.c
12
channels.c
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: channels.c 1.48 2006/01/14 15:51:02 kls Exp $
|
||||
* $Id: channels.c 1.49 2006/02/28 13:54:34 kls Exp $
|
||||
*/
|
||||
|
||||
#include "channels.h"
|
||||
@ -12,6 +12,7 @@
|
||||
#include <ctype.h>
|
||||
#include "device.h"
|
||||
#include "epg.h"
|
||||
#include "timers.h"
|
||||
|
||||
// IMPORTANT NOTE: in the 'sscanf()' calls there is a blank after the '%d'
|
||||
// format characters in order to allow any number of blanks after a numeric
|
||||
@ -248,6 +249,15 @@ int cChannel::Transponder(void) const
|
||||
return tf;
|
||||
}
|
||||
|
||||
bool cChannel::HasTimer(void) const
|
||||
{
|
||||
for (cTimer *Timer = Timers.First(); Timer; Timer = Timers.Next(Timer)) {
|
||||
if (Timer->Channel() == this)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
int cChannel::Modification(int Mask)
|
||||
{
|
||||
int Result = modification & Mask;
|
||||
|
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: channels.h 1.39 2006/02/19 14:39:43 kls Exp $
|
||||
* $Id: channels.h 1.40 2006/02/28 13:52:49 kls Exp $
|
||||
*/
|
||||
|
||||
#ifndef __CHANNELS_H
|
||||
@ -202,6 +202,7 @@ public:
|
||||
bool IsSat(void) const { return cSource::IsSat(source); }
|
||||
bool IsTerr(void) const { return cSource::IsTerr(source); }
|
||||
tChannelID GetChannelID(void) const { return tChannelID(source, nid, (nid || tid) ? tid : Transponder(), sid, rid); }
|
||||
bool HasTimer(void) const;
|
||||
int Modification(int Mask = CHANNELMOD_ALL);
|
||||
void CopyTransponderData(const cChannel *Channel);
|
||||
bool SetSatTransponderData(int Source, int Frequency, char Polarization, int Srate, int CoderateH);
|
||||
|
5
epg.c
5
epg.c
@ -7,7 +7,7 @@
|
||||
* Original version (as used in VDR before 1.3.0) written by
|
||||
* Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>.
|
||||
*
|
||||
* $Id: epg.c 1.64 2006/02/26 15:07:17 kls Exp $
|
||||
* $Id: epg.c 1.65 2006/02/28 13:56:05 kls Exp $
|
||||
*/
|
||||
|
||||
#include "epg.h"
|
||||
@ -156,8 +156,7 @@ void cEvent::SetVersion(uchar Version)
|
||||
|
||||
void cEvent::SetRunningStatus(int RunningStatus, cChannel *Channel)
|
||||
{
|
||||
if (Channel && runningStatus != RunningStatus && (RunningStatus > SI::RunningStatusNotRunning || runningStatus > SI::RunningStatusUndefined))
|
||||
if (Channel->Number() <= 30)//XXX maybe log only those that have timers???
|
||||
if (Channel && runningStatus != RunningStatus && (RunningStatus > SI::RunningStatusNotRunning || runningStatus > SI::RunningStatusUndefined) && Channel->HasTimer())
|
||||
isyslog("channel %d (%s) event %s '%s' status %d", Channel->Number(), Channel->Name(), *GetTimeString(), Title(), RunningStatus);
|
||||
runningStatus = RunningStatus;
|
||||
}
|
||||
|
6
menu.c
6
menu.c
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: menu.c 1.423 2006/02/28 12:15:43 kls Exp $
|
||||
* $Id: menu.c 1.424 2006/02/28 13:58:00 kls Exp $
|
||||
*/
|
||||
|
||||
#include "menu.h"
|
||||
@ -500,12 +500,10 @@ eOSState cMenuChannels::Delete(void)
|
||||
cChannel *channel = GetChannel(Current());
|
||||
int DeletedChannel = channel->Number();
|
||||
// Check if there is a timer using this channel:
|
||||
for (cTimer *ti = Timers.First(); ti; ti = Timers.Next(ti)) {
|
||||
if (ti->Channel() == channel) {
|
||||
if (channel->HasTimer()) {
|
||||
Skins.Message(mtError, tr("Channel is being used by a timer!"));
|
||||
return osContinue;
|
||||
}
|
||||
}
|
||||
if (Interface->Confirm(tr("Delete channel?"))) {
|
||||
Channels.Del(channel);
|
||||
cOsdMenu::Del(Index);
|
||||
|
Loading…
Reference in New Issue
Block a user