diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2005-09-25 11:35:56 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2005-09-25 11:35:56 +0200 |
commit | da501a4b8299ca37efab4612a1a63d829beb2784 (patch) | |
tree | d3e25e26a8ac3fca57b3ddeacd4291badff81847 /recording.c | |
parent | 9e8aac388237e7afff6cae5bbf5ee08756633f53 (diff) | |
download | vdr-da501a4b8299ca37efab4612a1a63d829beb2784.tar.gz vdr-da501a4b8299ca37efab4612a1a63d829beb2784.tar.bz2 |
The 'new' indicator in the Recordings menu is now kept up-to-date
Diffstat (limited to 'recording.c')
-rw-r--r-- | recording.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/recording.c b/recording.c index ccdb71c4..d4aa7eaf 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.115 2005/09/25 10:40:31 kls Exp $ + * $Id: recording.c 1.116 2005/09/25 11:31:52 kls Exp $ */ #include "recording.h" @@ -215,6 +215,7 @@ bool cResumeFile::Save(int Index) if (safe_write(f, &Index, sizeof(Index)) < 0) LOG_ERROR_STR(fileName); close(f); + Recordings.ResetResume(fileName); return true; } } @@ -226,6 +227,7 @@ void cResumeFile::Delete(void) if (fileName) { if (remove(fileName) < 0 && errno != ENOENT) LOG_ERROR_STR(fileName); + Recordings.ResetResume(fileName); } } @@ -732,6 +734,11 @@ bool cRecording::Remove(void) return RemoveVideoFile(FileName()); } +void cRecording::ResetResume(void) const +{ + resume = RESUME_NOT_INITIALIZED; +} + // --- cRecordings ----------------------------------------------------------- cRecordings Recordings; @@ -860,6 +867,14 @@ void cRecordings::DelByName(const char *FileName) } } +void cRecordings::ResetResume(const char *ResumeFileName) +{ + for (cRecording *recording = First(); recording; recording = Next(recording)) { + if (!ResumeFileName || strncmp(ResumeFileName, recording->FileName(), strlen(recording->FileName())) == 0) + recording->ResetResume(); + } +} + // --- cMark ----------------------------------------------------------------- cMark::cMark(int Position, const char *Comment) |