summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--HISTORY11
-rw-r--r--i18n.c24
-rw-r--r--menu.c17
-rw-r--r--recording.c21
-rw-r--r--recording.h5
-rw-r--r--timers.c29
-rw-r--r--timers.h6
-rw-r--r--vdr.519
8 files changed, 61 insertions, 71 deletions
diff --git a/HISTORY b/HISTORY
index e90e6ed8..75f189ad 100644
--- a/HISTORY
+++ b/HISTORY
@@ -4371,3 +4371,14 @@ Video Disk Recorder Revision History
in libsi/descriptor.c obsolete (thanks to Marcel Wiesweg).
- The "Ok" key in the "Jump" mode of the replay progress display now confirms the
jump instead of closing the display (thanks to Christoph Haubrich).
+- The 'summary' field of a timer definition has been renamed to 'aux', and is now
+ only used for external applications to store auxiliary information with a timer,
+ which has no meaning whatsoever to VDR itself.
+ The contents of the 'aux' field of a timer is copied into the recording's
+ 'info.vdr' file, using the tag character '@'.
+- The description of a recording is now taken exclusively from its related EPG
+ data. If an application wants to use a different description it needs to set
+ it with SVDRP/PUTE and use table ID 0x00, so that it won't be overwritten (as
+ a side effect, however, this also disables VPS for such an event).
+- There is no more "Summary" menu when pressing "Ok" in the "Timers" menu.
+ The "Ok" key now always opens the "Edit timer" menu.
diff --git a/i18n.c b/i18n.c
index ad9b797e..2a3551ab 100644
--- a/i18n.c
+++ b/i18n.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: i18n.c 1.247 2006/02/04 14:17:54 kls Exp $
+ * $Id: i18n.c 1.248 2006/02/25 12:07:27 kls Exp $
*
* Translations provided by:
*
@@ -569,28 +569,6 @@ const tI18nPhrase Phrases[] = {
"Hvad vises som det næste?",
"Následující program",
},
- { "Summary",
- "Inhalt",
- "Vsebina",
- "Sommario",
- "Inhoud",
- "Resumo",
- "Résumé",
- "Sammendrag",
- "Yhteenveto",
- "Podsumowanie",
- "Resumen",
- "Ðåñéå÷üìåíï",
- "Sammanfattning",
- "Cuprins",
- "Tartalom",
- "Resum",
- "¾ßØáÐÝØÕ",
- "Sadr¾aj",
- "Ülevaade",
- "Omtale",
- "Obsah",
- },
// Button texts (should not be more than 10 characters!):
{ "Button$Edit",
"Editieren",
diff --git a/menu.c b/menu.c
index bef2431d..c791db25 100644
--- a/menu.c
+++ b/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.416 2006/02/25 10:27:03 kls Exp $
+ * $Id: menu.c 1.417 2006/02/25 12:09:22 kls Exp $
*/
#include "menu.h"
@@ -776,7 +776,6 @@ private:
eOSState Delete(void);
eOSState OnOff(void);
virtual void Move(int From, int To);
- eOSState Summary(void);
cTimer *CurrentTimer(void);
public:
cMenuTimers(void);
@@ -870,16 +869,6 @@ void cMenuTimers::Move(int From, int To)
isyslog("timer %d moved to %d", From + 1, To + 1);
}
-eOSState cMenuTimers::Summary(void)
-{
- if (HasSubMenu() || Count() == 0)
- return osContinue;
- cTimer *ti = CurrentTimer();
- if (ti && !isempty(ti->Summary()))
- return AddSubMenu(new cMenuText(tr("Summary"), ti->Summary()));
- return Edit(); // convenience for people not using the Summary feature ;-)
-}
-
eOSState cMenuTimers::ProcessKey(eKeys Key)
{
int TimerNumber = HasSubMenu() ? Count() : -1;
@@ -887,8 +876,8 @@ eOSState cMenuTimers::ProcessKey(eKeys Key)
if (state == osUnknown) {
switch (Key) {
- case kOk: return Summary();
- case kRed: return Edit();
+ case kOk: return Edit();
+ case kRed: return Edit();//XXX
case kGreen: return New();
case kYellow: return Delete();
case kBlue: if (Setup.SortTimers)
diff --git a/recording.c b/recording.c
index 1efa3f64..535d02ea 100644
--- a/recording.c
+++ b/recording.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: recording.c 1.137 2006/02/19 13:09:29 kls Exp $
+ * $Id: recording.c 1.138 2006/02/25 11:49:48 kls Exp $
*/
#include "recording.h"
@@ -261,6 +261,7 @@ cRecordingInfo::cRecordingInfo(const cChannel *Channel, const cEvent *Event)
channelID = Channel ? Channel->GetChannelID() : tChannelID::InvalidID;
ownEvent = Event ? NULL : new cEvent(0);
event = ownEvent ? ownEvent : Event;
+ aux = NULL;
if (Channel) {
// Since the EPG data's component records can carry only a single
// language code, let's see whether the channel's PID data has
@@ -299,6 +300,7 @@ cRecordingInfo::cRecordingInfo(const cChannel *Channel, const cEvent *Event)
cRecordingInfo::~cRecordingInfo()
{
delete ownEvent;
+ free(aux);
}
void cRecordingInfo::SetData(const char *Title, const char *ShortText, const char *Description)
@@ -311,6 +313,12 @@ void cRecordingInfo::SetData(const char *Title, const char *ShortText, const cha
((cEvent *)event)->SetDescription(Description);
}
+void cRecordingInfo::SetAux(const char *Aux)
+{
+ free(aux);
+ aux = Aux ? strdup(Aux) : NULL;
+}
+
bool cRecordingInfo::Read(FILE *f)
{
if (ownEvent) {
@@ -329,6 +337,9 @@ bool cRecordingInfo::Read(FILE *f)
channelID = tChannelID::FromString(t);
}
break;
+ case '@': free(aux);
+ aux = strdup(t);
+ break;
default: if (!ownEvent->Parse(s)) {
esyslog("ERROR: EPG data problem in line %d", line);
return false;
@@ -346,6 +357,8 @@ bool cRecordingInfo::Write(FILE *f, const char *Prefix) const
if (channelID.Valid())
fprintf(f, "%sC %s\n", Prefix, *channelID.ToString());
event->Dump(f, Prefix, true);
+ if (aux)
+ fprintf(f, "%s@ %s\n", Prefix, aux);
return true;
}
@@ -497,11 +510,7 @@ cRecording::cRecording(cTimer *Timer, const cEvent *Event)
lifetime = Timer->Lifetime();
// handle info:
info = new cRecordingInfo(Timer->Channel(), Event);
- // this is a somewhat ugly hack to get the 'summary' information from the
- // timer into the recording info, but it saves us from having to actually
- // copy the entire event data:
- if (!isempty(Timer->Summary()))
- info->SetData(isempty(info->Title()) ? Timer->File() : NULL, NULL, Timer->Summary());
+ info->SetAux(Timer->Aux());
}
cRecording::cRecording(const char *FileName)
diff --git a/recording.h b/recording.h
index 4ad4077a..a114c0bf 100644
--- a/recording.h
+++ b/recording.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: recording.h 1.51 2006/02/18 16:03:40 kls Exp $
+ * $Id: recording.h 1.52 2006/02/25 10:51:15 kls Exp $
*/
#ifndef __RECORDING_H
@@ -44,14 +44,17 @@ private:
tChannelID channelID;
const cEvent *event;
cEvent *ownEvent;
+ char *aux;
cRecordingInfo(const cChannel *Channel = NULL, const cEvent *Event = NULL);
void SetData(const char *Title, const char *ShortText, const char *Description);
+ void SetAux(const char *Aux);
public:
~cRecordingInfo();
const char *Title(void) const { return event->Title(); }
const char *ShortText(void) const { return event->ShortText(); }
const char *Description(void) const { return event->Description(); }
const cComponents *Components(void) const { return event->Components(); }
+ const char *Aux(void) const { return aux; }
bool Read(FILE *f);
bool Write(FILE *f, const char *Prefix = "") const;
};
diff --git a/timers.c b/timers.c
index e5b9ea61..ed5387de 100644
--- a/timers.c
+++ b/timers.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: timers.c 1.46 2006/02/03 15:20:14 kls Exp $
+ * $Id: timers.c 1.47 2006/02/25 10:44:50 kls Exp $
*/
#include "timers.h"
@@ -41,7 +41,7 @@ cTimer::cTimer(bool Instant, bool Pause, cChannel *Channel)
priority = Pause ? Setup.PausePriority : Setup.DefaultPriority;
lifetime = Pause ? Setup.PauseLifetime : Setup.DefaultLifetime;
*file = 0;
- summary = NULL;
+ aux = NULL;
event = NULL;
if (Instant && channel)
snprintf(file, sizeof(file), "%s%s", Setup.MarkInstantRecord ? "@" : "", *Setup.NameInstantRecord ? Setup.NameInstantRecord : channel->Name());
@@ -76,20 +76,20 @@ cTimer::cTimer(const cEvent *Event)
const char *Title = Event->Title();
if (!isempty(Title))
strn0cpy(file, Event->Title(), sizeof(file));
- summary = NULL;
+ aux = NULL;
event = Event;
}
cTimer::~cTimer()
{
- free(summary);
+ free(aux);
}
cTimer& cTimer::operator= (const cTimer &Timer)
{
memcpy(this, &Timer, sizeof(*this));
- if (summary)
- summary = strdup(summary);
+ if (aux)
+ aux = strdup(aux);
event = NULL;
return *this;
}
@@ -109,9 +109,7 @@ cString cTimer::ToText(bool UseChannelID)
{
char *buffer;
strreplace(file, ':', '|');
- strreplace(summary, '\n', '|');
- asprintf(&buffer, "%u:%s:%s:%04d:%04d:%d:%d:%s:%s\n", flags, UseChannelID ? *Channel()->GetChannelID().ToString() : *itoa(Channel()->Number()), *PrintDay(day, weekdays), start, stop, priority, lifetime, file, summary ? summary : "");
- strreplace(summary, '|', '\n');
+ asprintf(&buffer, "%u:%s:%s:%04d:%04d:%d:%d:%s:%s\n", flags, UseChannelID ? *Channel()->GetChannelID().ToString() : *itoa(Channel()->Number()), *PrintDay(day, weekdays), start, stop, priority, lifetime, file, aux ? aux : "");
strreplace(file, '|', ':');
return cString(buffer, true);
}
@@ -226,8 +224,8 @@ bool cTimer::Parse(const char *s)
char *channelbuffer = NULL;
char *daybuffer = NULL;
char *filebuffer = NULL;
- free(summary);
- summary = NULL;
+ free(aux);
+ aux = NULL;
//XXX Apparently sscanf() doesn't work correctly if the last %a argument
//XXX results in an empty string (this first occured when the EIT gathering
//XXX was put into a separate thread - don't know why this happens...
@@ -244,17 +242,16 @@ bool cTimer::Parse(const char *s)
s = s2;
}
bool result = false;
- if (8 <= sscanf(s, "%u :%a[^:]:%a[^:]:%d :%d :%d :%d :%a[^:\n]:%a[^\n]", &flags, &channelbuffer, &daybuffer, &start, &stop, &priority, &lifetime, &filebuffer, &summary)) {
+ if (8 <= sscanf(s, "%u :%a[^:]:%a[^:]:%d :%d :%d :%d :%a[^:\n]:%a[^\n]", &flags, &channelbuffer, &daybuffer, &start, &stop, &priority, &lifetime, &filebuffer, &aux)) {
ClrFlags(tfRecording);
- if (summary && !*skipspace(summary)) {
- free(summary);
- summary = NULL;
+ if (aux && !*skipspace(aux)) {
+ free(aux);
+ aux = NULL;
}
//TODO add more plausibility checks
result = ParseDay(daybuffer, day, weekdays);
strn0cpy(file, filebuffer, MaxFileName);
strreplace(file, '|', ':');
- strreplace(summary, '|', '\n');
if (isnumber(channelbuffer))
channel = Channels.GetByNumber(atoi(channelbuffer));
else
diff --git a/timers.h b/timers.h
index 73b951d1..7da77014 100644
--- a/timers.h
+++ b/timers.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: timers.h 1.24 2006/01/15 13:29:44 kls Exp $
+ * $Id: timers.h 1.25 2006/02/25 10:42:10 kls Exp $
*/
#ifndef __TIMERS_H
@@ -38,7 +38,7 @@ private:
int priority;
int lifetime;
char file[MaxFileName];
- char *summary;
+ char *aux;
const cEvent *event;
public:
cTimer(bool Instant = false, bool Pause = false, cChannel *Channel = NULL);
@@ -59,7 +59,7 @@ public:
int Lifetime(void) const { return lifetime; }
const char *File(void) const { return file; }
time_t FirstDay(void) const { return weekdays ? day : 0; }
- const char *Summary(void) const { return summary; }
+ const char *Aux(void) const { return aux; }
cString ToText(bool UseChannelID = false);
cString ToDescr(void) const;
const cEvent *Event(void) const { return event; }
diff --git a/vdr.5 b/vdr.5
index 8468ee4c..c360f161 100644
--- a/vdr.5
+++ b/vdr.5
@@ -8,7 +8,7 @@
.\" License as specified in the file COPYING that comes with the
.\" vdr distribution.
.\"
-.\" $Id: vdr.5 1.49 2006/02/18 15:59:00 kls Exp $
+.\" $Id: vdr.5 1.50 2006/02/25 11:16:02 kls Exp $
.\"
.TH vdr 5 "19 Feb 2006" "1.3.43" "Video Disk Recorder Files"
.SH NAME
@@ -321,11 +321,11 @@ recording (if that data is available). If at the time of recording either
of these cannot be determined, \fBTITLE\fR will default to the channel name, and
\fBEPISODE\fR will default to a blank.
.TP
-.B Summary
-Arbitrary text that describes the recording made by this timer.
-Any newline characters in the summary have to be replaced by '|', and
-the summary may contain ':' characters. If this field is not empty, its
-contents will be written into the \fIinfo.vdr\fR file of the recording.
+.B Auxiliary data
+An arbitrary string that can be used by external applications to store any
+kind of data related to this timer. The string must not contain any newline
+characters. If this field is not empty, its contents will be written into the
+\fIinfo.vdr\fR file of the recording with the '@' tag.
.SS SOURCES
The file \fIsources.conf\fR defines the codes to be used in the \fBSource\fR field
of channels in \fIchannels.conf\fR and assigns descriptive texts to them.
@@ -567,8 +567,9 @@ actual contents of this file.
.SS INFO
The file \fIinfo.vdr\fR (if present in a recording directory) contains
a description of the recording, derived from the EPG data at recording time
-(if such data was available) or the \fBSummary\fR field of the corresponding
-timer. This is a plain ASCII file and contains tagged lines like the \fBEPG DATA\fR
+(if such data was available). The \fBAux\fR field of the corresponding
+timer (if given) is copied into this file, using the '@' tag.
+This is a plain ASCII file and contains tagged lines like the \fBEPG DATA\fR
file (see the description of the \fIepg.data\fR file). Note that the tags
c, E, e and V will not appear in an \fIinfo.vdr\fR file.
.SS RESUME
@@ -626,6 +627,8 @@ All other tags are optional (although every event
should at least have a \fBT\fR entry).
There may be several \fBX\fR tags, depending on the number of tracks (video, audio etc.)
the event provides.
+The special tag character \fB@\fR is used to mark the \fBauxiliary data\fR from
+a timer definition in the \fIinfo.vdr\fR file.
.TS
tab (@);