summaryrefslogtreecommitdiff
path: root/menu.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2021-05-19 11:22:20 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2021-05-19 11:22:20 +0200
commit31b87544f1ca5580ad96d080e5b93793775b4fdb (patch)
tree6332371bf0a9499717d193d973e32b80b8c207fc /menu.c
parentcd3cda2654bbd4272096bbabb4953ce352de8358 (diff)
downloadvdr-31b87544f1ca5580ad96d080e5b93793775b4fdb.tar.gz
vdr-31b87544f1ca5580ad96d080e5b93793775b4fdb.tar.bz2
Recordings are now checked for errors
Diffstat (limited to 'menu.c')
-rw-r--r--menu.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/menu.c b/menu.c
index 2beae50c..c6104e67 100644
--- a/menu.c
+++ b/menu.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: menu.c 5.4 2021/04/17 09:44:01 kls Exp $
+ * $Id: menu.c 5.5 2021/05/19 11:22:20 kls Exp $
*/
#include "menu.h"
@@ -5401,6 +5401,15 @@ bool cRecordControl::GetEvent(void)
void cRecordControl::Stop(bool ExecuteUserCommand)
{
if (timer) {
+ if (recorder) {
+ int Errors = recorder->Errors();
+ bool Finished = timer->HasFlags(tfActive) && !timer->Matches();
+ isyslog("timer %s %s with %d error%s", *timer->ToDescr(), Finished ? "finished" : "stopped", Errors, Errors != 1 ? "s" : "");
+ if (timer->HasFlags(tfAvoid) && Errors == 0 && Finished) {
+ const char *p = strgetlast(timer->File(), FOLDERDELIMCHAR);
+ DoneRecordingsPattern.Append(p);
+ }
+ }
DELETENULL(recorder);
timer->SetRecording(false);
timer = NULL;
@@ -5414,13 +5423,8 @@ void cRecordControl::Stop(bool ExecuteUserCommand)
bool cRecordControl::Process(time_t t)
{
if (!recorder || !recorder->IsAttached() || !timer || !timer->Matches(t)) {
- if (timer) {
+ if (timer)
timer->SetPending(false);
- if (timer->HasFlags(tfAvoid)) {
- const char *p = strgetlast(timer->File(), FOLDERDELIMCHAR);
- DoneRecordingsPattern.Append(p);
- }
- }
return false;
}
return true;