From a1da0e5c5de55009716e2c327dda16c61c1dae83 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sun, 10 Feb 2002 18:00:00 +0100 Subject: =?UTF-8?q?Version=200.99=20-=20Fixed=20a=20bug=20in=20moving=20ti?= =?UTF-8?q?mers=20or=20channels=20to=20the=20last=20position=20in=20the=20?= =?UTF-8?q?list=20=20=20(thanks=20to=20Matthias=20Schniedermeyer=20for=20h?= =?UTF-8?q?elping=20to=20debug=20this=20one).=20-=20Changed=20the=20estima?= =?UTF-8?q?ted=20data=20rate=20for=20calculating=20the=20remaining=20disk?= =?UTF-8?q?=20capacity=20=20=20to=2025.75=20MB/min.=20-=20Only=20reporting?= =?UTF-8?q?=20the=20'EPG=20bugfix=20statistics'=20if=20there=20really=20we?= =?UTF-8?q?re=20any=20fixes.=20-=20Added=20Finnish=20language=20texts=20(t?= =?UTF-8?q?hanks=20to=20Hannu=20Savolainen).=20-=20Reverted=20to=20the=20p?= =?UTF-8?q?revious=20way=20of=20searching=20for=20the=20EPG=20record=20of?= =?UTF-8?q?=20the=20current=20=20=20recording=20in=20case=20of=20a=20perio?= =?UTF-8?q?dic=20timer=20(i.e.=20taking=20the=20one=20that=20is=20in=20the?= =?UTF-8?q?=20=20=20middle=20between=20start=20and=20end=20time).=20-=20Ad?= =?UTF-8?q?ded=20a=20typedef=20for=20'in=5Faddr=5Ft'=20to=20make=20it=20wo?= =?UTF-8?q?rk=20with=20glibc=20<=202.2=20(thanks=20to=20=20=20J=FCrgen=20S?= =?UTF-8?q?chmidt).=20-=20When=20the=20last=20entry=20in=20a=20"Recordings?= =?UTF-8?q?"=20menu=20page=20is=20deleted,=20that=20page=20is=20now=20=20?= =?UTF-8?q?=20automatically=20closed=20(suggested=20by=20Uwe=20Freese).=20?= =?UTF-8?q?-=20Changed=20the=20default=20name=20for=20instant=20recordings?= =?UTF-8?q?=20to=20"TITLE=20EPISODE"=20(avoiding=20=20=20the=20'-').=20-?= =?UTF-8?q?=20If=20Setup.ShowInfoOnChSwitch=20is=20set=20to=20"no",=20the?= =?UTF-8?q?=20box=20for=20the=20EPG=20display=20is=20no=20=20=20longer=20s?= =?UTF-8?q?hown=20(thanks=20to=20Andy=20Grobb).=20-=20If=20compiled=20with?= =?UTF-8?q?=20VFAT=3D1,=20characters=20that=20can't=20be=20handled=20by=20?= =?UTF-8?q?a=20VFAT=20system=20are=20=20=20now=20encoded=20to=20'#XX'.=20-?= =?UTF-8?q?=20When=20the=20user=20presses=20the=20"Power"=20button=20and?= =?UTF-8?q?=20there=20is=20a=20timer=20about=20to=20start=20=20=20recordin?= =?UTF-8?q?g=20within=20Setup.MinEventTimeout=20minutes,=20there=20is=20no?= =?UTF-8?q?w=20a=20confirmation=20=20=20prompt=20telling=20the=20user=20th?= =?UTF-8?q?at=20there=20is=20an=20upcoming=20timer=20event.=20-=20If=20a?= =?UTF-8?q?=20recording=20has=20no=20episode=20title,=20the=20trailing=20'?= =?UTF-8?q?~'=20is=20no=20longer=20shown=20in=20=20=20the=20progress=20dis?= =?UTF-8?q?play.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- eit.c | 47 +++++++++++++++++++++++++++-------------------- 1 file changed, 27 insertions(+), 20 deletions(-) (limited to 'eit.c') diff --git a/eit.c b/eit.c index 2860fc4..99bcdff 100644 --- a/eit.c +++ b/eit.c @@ -16,7 +16,7 @@ * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * - * $Id: eit.c 1.33 2002/02/02 12:12:26 kls Exp $ + * $Id: eit.c 1.34 2002/02/09 14:48:43 kls Exp $ ***************************************************************************/ #include "eit.h" @@ -352,7 +352,7 @@ void cEventInfo::Dump(FILE *f, const char *Prefix) const } } -#define MAXEPGBUGFIXSTATS 6 +#define MAXEPGBUGFIXSTATS 5 #define MAXEPGBUGFIXCHANS 50 struct tEpgBugFixStats { int hits; @@ -381,32 +381,39 @@ static void EpgBugFixStat(int Number, unsigned int ServiceID) static void ReportEpgBugFixStats(bool Reset = false) { if (Setup.EPGBugfixLevel > 0) { - dsyslog(LOG_INFO, "====================="); - dsyslog(LOG_INFO, "EPG bugfix statistics"); - dsyslog(LOG_INFO, "====================="); - dsyslog(LOG_INFO, "IF SOMEBODY WHO IS IN CHARGE OF THE EPG DATA FOR ONE OF THE LISTED"); - dsyslog(LOG_INFO, "CHANNELS READS THIS: PLEASE TAKE A LOOK AT THE FUNCTION cEventInfo::FixEpgBugs()"); - dsyslog(LOG_INFO, "IN VDR/eit.c TO LEARN WHAT'S WRONG WITH YOUR DATA, AND FIX IT!"); - dsyslog(LOG_INFO, "====================="); - dsyslog(LOG_INFO, "Fix\tHits\tChannels"); + bool GotHits = false; char buffer[1024]; for (int i = 0; i < MAXEPGBUGFIXSTATS; i++) { const char *delim = "\t"; tEpgBugFixStats *p = &EpgBugFixStats[i]; - char *q = buffer; - q += snprintf(q, sizeof(buffer) - (q - buffer), "%d\t%d", i, p->hits); - for (int c = 0; c < p->n; c++) { - cChannel *channel = Channels.GetByServiceID(p->serviceIDs[c]); - if (channel) { - q += snprintf(q, sizeof(buffer) - (q - buffer), "%s%s", delim, channel->name); - delim = ", "; + if (p->hits) { + if (!GotHits) { + dsyslog(LOG_INFO, "====================="); + dsyslog(LOG_INFO, "EPG bugfix statistics"); + dsyslog(LOG_INFO, "====================="); + dsyslog(LOG_INFO, "IF SOMEBODY WHO IS IN CHARGE OF THE EPG DATA FOR ONE OF THE LISTED"); + dsyslog(LOG_INFO, "CHANNELS READS THIS: PLEASE TAKE A LOOK AT THE FUNCTION cEventInfo::FixEpgBugs()"); + dsyslog(LOG_INFO, "IN VDR/eit.c TO LEARN WHAT'S WRONG WITH YOUR DATA, AND FIX IT!"); + dsyslog(LOG_INFO, "====================="); + dsyslog(LOG_INFO, "Fix\tHits\tChannels"); + GotHits = true; + } + char *q = buffer; + q += snprintf(q, sizeof(buffer) - (q - buffer), "%d\t%d", i, p->hits); + for (int c = 0; c < p->n; c++) { + cChannel *channel = Channels.GetByServiceID(p->serviceIDs[c]); + if (channel) { + q += snprintf(q, sizeof(buffer) - (q - buffer), "%s%s", delim, channel->name); + delim = ", "; + } } - } - dsyslog(LOG_INFO, "%s", buffer); + dsyslog(LOG_INFO, "%s", buffer); + } if (Reset) p->hits = p->n = 0; } - dsyslog(LOG_INFO, "====================="); + if (GotHits) + dsyslog(LOG_INFO, "====================="); } } -- cgit v1.2.3