mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
The info.vdr file now also stores the name of the channel
This commit is contained in:
parent
efbb48dbaf
commit
da376c0603
@ -1926,6 +1926,7 @@ Alexander Hans <cleditor@arcor.de>
|
||||
to be drawn with a transparent background
|
||||
for reporting that the "'1' for encrypted radio channels" part in the description
|
||||
of the VPID in vdr.5 is obsolete
|
||||
for a patch that was used to implement storing the channel name in info.vdr
|
||||
|
||||
Daniel Karsubka <dkar@gmx.de>
|
||||
for suggesting to write the epg.data file when VDR exits
|
||||
|
3
HISTORY
3
HISTORY
@ -5252,3 +5252,6 @@ Video Disk Recorder Revision History
|
||||
- Changed the parameter "OSD font" to "Default font" in "Setup/OSD" (suggested
|
||||
by Rolf Ahrenberg).
|
||||
- Fixed handling detached processes in SystemExec() (thanks to Udo Richter).
|
||||
- The info.vdr file now also stores the name of the channel, and the new function
|
||||
cRecordingInfo::ChannelName() returns this information if available (based on
|
||||
a patch from Alexander Hans).
|
||||
|
11
recording.c
11
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.153 2007/06/16 09:36:08 kls Exp $
|
||||
* $Id: recording.c 1.154 2007/06/17 13:10:12 kls Exp $
|
||||
*/
|
||||
|
||||
#include "recording.h"
|
||||
@ -262,6 +262,7 @@ void cResumeFile::Delete(void)
|
||||
cRecordingInfo::cRecordingInfo(const cChannel *Channel, const cEvent *Event)
|
||||
{
|
||||
channelID = Channel ? Channel->GetChannelID() : tChannelID::InvalidID;
|
||||
channelName = Channel ? strdup(Channel->Name()) : NULL;
|
||||
ownEvent = Event ? NULL : new cEvent(0);
|
||||
event = ownEvent ? ownEvent : Event;
|
||||
aux = NULL;
|
||||
@ -304,6 +305,7 @@ cRecordingInfo::~cRecordingInfo()
|
||||
{
|
||||
delete ownEvent;
|
||||
free(aux);
|
||||
free(channelName);
|
||||
}
|
||||
|
||||
void cRecordingInfo::SetData(const char *Title, const char *ShortText, const char *Description)
|
||||
@ -334,8 +336,11 @@ bool cRecordingInfo::Read(FILE *f)
|
||||
switch (*s) {
|
||||
case 'C': {
|
||||
char *p = strchr(t, ' ');
|
||||
if (p)
|
||||
if (p) {
|
||||
free(channelName);
|
||||
asprintf(&channelName, "%s", compactspace(p));
|
||||
*p = 0; // strips optional channel name
|
||||
}
|
||||
if (*t)
|
||||
channelID = tChannelID::FromString(t);
|
||||
}
|
||||
@ -375,7 +380,7 @@ bool cRecordingInfo::Read(FILE *f)
|
||||
bool cRecordingInfo::Write(FILE *f, const char *Prefix) const
|
||||
{
|
||||
if (channelID.Valid())
|
||||
fprintf(f, "%sC %s\n", Prefix, *channelID.ToString());
|
||||
fprintf(f, "%sC %s%s%s\n", Prefix, *channelID.ToString(), channelName ? " " : "", channelName ? channelName : "");
|
||||
event->Dump(f, Prefix, true);
|
||||
if (aux)
|
||||
fprintf(f, "%s@ %s\n", Prefix, aux);
|
||||
|
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: recording.h 1.56 2006/12/01 15:06:07 kls Exp $
|
||||
* $Id: recording.h 1.57 2007/06/17 12:53:05 kls Exp $
|
||||
*/
|
||||
|
||||
#ifndef __RECORDING_H
|
||||
@ -42,6 +42,7 @@ class cRecordingInfo {
|
||||
friend class cRecording;
|
||||
private:
|
||||
tChannelID channelID;
|
||||
char *channelName;
|
||||
const cEvent *event;
|
||||
cEvent *ownEvent;
|
||||
char *aux;
|
||||
@ -51,6 +52,7 @@ private:
|
||||
public:
|
||||
~cRecordingInfo();
|
||||
tChannelID ChannelID(void) const { return channelID; }
|
||||
const char *ChannelName(void) const { return channelName; }
|
||||
const char *Title(void) const { return event->Title(); }
|
||||
const char *ShortText(void) const { return event->ShortText(); }
|
||||
const char *Description(void) const { return event->Description(); }
|
||||
|
Loading…
Reference in New Issue
Block a user