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
|
to be drawn with a transparent background
|
||||||
for reporting that the "'1' for encrypted radio channels" part in the description
|
for reporting that the "'1' for encrypted radio channels" part in the description
|
||||||
of the VPID in vdr.5 is obsolete
|
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>
|
Daniel Karsubka <dkar@gmx.de>
|
||||||
for suggesting to write the epg.data file when VDR exits
|
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
|
- Changed the parameter "OSD font" to "Default font" in "Setup/OSD" (suggested
|
||||||
by Rolf Ahrenberg).
|
by Rolf Ahrenberg).
|
||||||
- Fixed handling detached processes in SystemExec() (thanks to Udo Richter).
|
- 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
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* 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"
|
#include "recording.h"
|
||||||
@ -262,6 +262,7 @@ void cResumeFile::Delete(void)
|
|||||||
cRecordingInfo::cRecordingInfo(const cChannel *Channel, const cEvent *Event)
|
cRecordingInfo::cRecordingInfo(const cChannel *Channel, const cEvent *Event)
|
||||||
{
|
{
|
||||||
channelID = Channel ? Channel->GetChannelID() : tChannelID::InvalidID;
|
channelID = Channel ? Channel->GetChannelID() : tChannelID::InvalidID;
|
||||||
|
channelName = Channel ? strdup(Channel->Name()) : NULL;
|
||||||
ownEvent = Event ? NULL : new cEvent(0);
|
ownEvent = Event ? NULL : new cEvent(0);
|
||||||
event = ownEvent ? ownEvent : Event;
|
event = ownEvent ? ownEvent : Event;
|
||||||
aux = NULL;
|
aux = NULL;
|
||||||
@ -304,6 +305,7 @@ cRecordingInfo::~cRecordingInfo()
|
|||||||
{
|
{
|
||||||
delete ownEvent;
|
delete ownEvent;
|
||||||
free(aux);
|
free(aux);
|
||||||
|
free(channelName);
|
||||||
}
|
}
|
||||||
|
|
||||||
void cRecordingInfo::SetData(const char *Title, const char *ShortText, const char *Description)
|
void cRecordingInfo::SetData(const char *Title, const char *ShortText, const char *Description)
|
||||||
@ -334,8 +336,11 @@ bool cRecordingInfo::Read(FILE *f)
|
|||||||
switch (*s) {
|
switch (*s) {
|
||||||
case 'C': {
|
case 'C': {
|
||||||
char *p = strchr(t, ' ');
|
char *p = strchr(t, ' ');
|
||||||
if (p)
|
if (p) {
|
||||||
|
free(channelName);
|
||||||
|
asprintf(&channelName, "%s", compactspace(p));
|
||||||
*p = 0; // strips optional channel name
|
*p = 0; // strips optional channel name
|
||||||
|
}
|
||||||
if (*t)
|
if (*t)
|
||||||
channelID = tChannelID::FromString(t);
|
channelID = tChannelID::FromString(t);
|
||||||
}
|
}
|
||||||
@ -375,7 +380,7 @@ bool cRecordingInfo::Read(FILE *f)
|
|||||||
bool cRecordingInfo::Write(FILE *f, const char *Prefix) const
|
bool cRecordingInfo::Write(FILE *f, const char *Prefix) const
|
||||||
{
|
{
|
||||||
if (channelID.Valid())
|
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);
|
event->Dump(f, Prefix, true);
|
||||||
if (aux)
|
if (aux)
|
||||||
fprintf(f, "%s@ %s\n", Prefix, aux);
|
fprintf(f, "%s@ %s\n", Prefix, aux);
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* 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
|
#ifndef __RECORDING_H
|
||||||
@ -42,6 +42,7 @@ class cRecordingInfo {
|
|||||||
friend class cRecording;
|
friend class cRecording;
|
||||||
private:
|
private:
|
||||||
tChannelID channelID;
|
tChannelID channelID;
|
||||||
|
char *channelName;
|
||||||
const cEvent *event;
|
const cEvent *event;
|
||||||
cEvent *ownEvent;
|
cEvent *ownEvent;
|
||||||
char *aux;
|
char *aux;
|
||||||
@ -51,6 +52,7 @@ private:
|
|||||||
public:
|
public:
|
||||||
~cRecordingInfo();
|
~cRecordingInfo();
|
||||||
tChannelID ChannelID(void) const { return channelID; }
|
tChannelID ChannelID(void) const { return channelID; }
|
||||||
|
const char *ChannelName(void) const { return channelName; }
|
||||||
const char *Title(void) const { return event->Title(); }
|
const char *Title(void) const { return event->Title(); }
|
||||||
const char *ShortText(void) const { return event->ShortText(); }
|
const char *ShortText(void) const { return event->ShortText(); }
|
||||||
const char *Description(void) const { return event->Description(); }
|
const char *Description(void) const { return event->Description(); }
|
||||||
|
Loading…
Reference in New Issue
Block a user