diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2021-01-18 13:35:16 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2021-01-18 13:35:16 +0100 |
commit | 2f6ce68ca74153c6343568394afcfc24a53e6806 (patch) | |
tree | cba4b34d019b9803f2ba90eacd4ceb547ca2ccd5 | |
parent | dee1225fa4d5de99b414b3748a21ef43e522818e (diff) | |
download | vdr-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
-rw-r--r-- | HISTORY | 2 | ||||
-rw-r--r-- | recording.c | 8 |
2 files changed, 6 insertions, 4 deletions
@@ -9599,3 +9599,5 @@ Video Disk Recorder Revision History in case there is more than one timer that will match that event. - Made the functions cRecordingInfo::SetData() and cRecordingInfo::SetAux() public (thanks to Peter Bieringer). +- Fixed setting the 'title' of a recording's info to the recording's name if there + is no info file (the change in version 1.7.28 broke the fallback to the old 'summary.vdr'). 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)); } } |