summaryrefslogtreecommitdiff
path: root/recording.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2021-01-18 13:35:16 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2021-01-18 13:35:16 +0100
commit2f6ce68ca74153c6343568394afcfc24a53e6806 (patch)
treecba4b34d019b9803f2ba90eacd4ceb547ca2ccd5 /recording.c
parentdee1225fa4d5de99b414b3748a21ef43e522818e (diff)
downloadvdr-2f6ce68ca74153c6343568394afcfc24a53e6806.tar.gz
vdr-2f6ce68ca74153c6343568394afcfc24a53e6806.tar.bz2
Fixed setting the 'title' of a recording's info to the recording's name if there is no info file
Diffstat (limited to 'recording.c')
-rw-r--r--recording.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/recording.c b/recording.c
index 758f3a90..c84b7d62 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 5.3 2021/01/18 12:55:47 kls Exp $
+ * $Id: recording.c 5.4 2021/01/18 13:35:16 kls Exp $
*/
#include "recording.h"
@@ -873,9 +873,7 @@ cRecording::cRecording(const char *FileName)
}
fclose(f);
}
- else if (errno == ENOENT)
- info->ownEvent->SetTitle(name);
- else
+ else if (errno != ENOENT)
LOG_ERROR_STR(*InfoFileName);
#ifdef SUMMARYFALLBACK
// fall back to the old 'summary.vdr' if there was no 'info.vdr':
@@ -937,6 +935,8 @@ cRecording::cRecording(const char *FileName)
LOG_ERROR_STR(*SummaryFileName);
}
#endif
+ if (isempty(info->Title()))
+ info->ownEvent->SetTitle(strgetlast(name, FOLDERDELIMCHAR));
}
}