diff options
Diffstat (limited to 'recording.c')
-rw-r--r-- | recording.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/recording.c b/recording.c index 96dc95f9..e0f5b279 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 2.23 2010/03/07 14:06:04 kls Exp $ + * $Id: recording.c 2.24 2010/12/27 12:02:00 kls Exp $ */ #include "recording.h" @@ -678,7 +678,7 @@ cRecording::cRecording(const char *FileName) const char *p = strrchr(FileName, '/'); name = NULL; - info = new cRecordingInfo; + info = new cRecordingInfo(fileName); if (p) { time_t now = time(NULL); struct tm tm_r; @@ -921,6 +921,14 @@ bool cRecording::IsEdited(void) const return *s == '%'; } +void cRecording::ReadInfo(void) +{ + info->Read(); + priority = info->priority; + lifetime = info->lifetime; + framesPerSecond = info->framesPerSecond; +} + bool cRecording::WriteInfo(void) { cString InfoFileName = cString::sprintf("%s%s", fileName, isPesRecording ? INFOFILESUFFIX ".vdr" : INFOFILESUFFIX); @@ -1172,6 +1180,14 @@ void cRecordings::DelByName(const char *FileName) } } +void cRecordings::UpdateByName(const char *FileName) +{ + LOCK_THREAD; + cRecording *recording = GetByName(FileName); + if (recording) + recording->ReadInfo(); +} + int cRecordings::TotalFileSizeMB(void) { int size = 0; |