summaryrefslogtreecommitdiff
path: root/recording.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2010-12-27 12:25:19 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2010-12-27 12:25:19 +0100
commit9f60bd2fc401c0d195e2a55f24e0e09ec17bb824 (patch)
treeae1097fa6360941ab9d23b7eebe493b1a49eaef1 /recording.c
parent6c0612546ee688d7b7a800bb236396d800c4e19d (diff)
downloadvdr-9f60bd2fc401c0d195e2a55f24e0e09ec17bb824.tar.gz
vdr-9f60bd2fc401c0d195e2a55f24e0e09ec17bb824.tar.bz2
Now updating the 'frames per second' data in the list of recordings when a new recording is started that has a frame rate other than the default
Diffstat (limited to 'recording.c')
-rw-r--r--recording.c20
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;