Fixed setting the 'title' of a recording's info to the recording's name if there is no info file

This commit is contained in:
Klaus Schmidinger 2021-01-18 13:35:16 +01:00
parent dee1225fa4
commit 2f6ce68ca7
2 changed files with 6 additions and 4 deletions

View File

@ -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').

View File

@ -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));
}
}