1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Made checking for done recordings more tolerant

This commit is contained in:
Klaus Schmidinger 2021-03-17 10:55:43 +01:00
parent 36a833053b
commit 7ffc1a5efe
3 changed files with 33 additions and 3 deletions

View File

@ -9578,7 +9578,7 @@ Video Disk Recorder Revision History
given (reported by Manuel Reimer). given (reported by Manuel Reimer).
- Fixed handling $(PKG_CONFIG) in newplugin (thanks to Winfried Köhler). - Fixed handling $(PKG_CONFIG) in newplugin (thanks to Winfried Köhler).
2021-03-16: 2021-03-17:
- Fixed strreplace() to handle NULL strings (reported by Jürgen Schneider). - Fixed strreplace() to handle NULL strings (reported by Jürgen Schneider).
- Somewhere down the road the 'x' bit of Doxyfile.filter got lost, so the - Somewhere down the road the 'x' bit of Doxyfile.filter got lost, so the
@ -9611,3 +9611,6 @@ Video Disk Recorder Revision History
Processed(). The old functions Sync() and Repeat() are deprecated and may be Processed(). The old functions Sync() and Repeat() are deprecated and may be
removed in a future version. See the comments in filter.h for a description on removed in a future version. See the comments in filter.h for a description on
how to use these new function. how to use these new function.
- When checking whether a particular recording has already been made by a pattern
timer, the characters ' ' (blank), ':' and '-' are now ignored, making
"TITLE - EPISODE" and "TITLE: EPISODE" the same.

4
MANUAL
View File

@ -636,6 +636,10 @@ following the matching pattern. There are three macros that can be used here:
{>} everything after the matching pattern {>} everything after the matching pattern
{=} the matching pattern itself (just for completeness) {=} the matching pattern itself (just for completeness)
As of VDR version 2.5.2, the characters ' ' (blank), ':' and '-' are ignored
when checking whether a particular recording has already been made by a pattern
timer, making "TITLE - EPISODE" and "TITLE: EPISODE" the same.
* Managing folders * Managing folders
The "Select folder" menu, which can be accessed by pressing the "Red" key in The "Select folder" menu, which can be accessed by pressing the "Red" key in

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: recording.c 5.5 2021/01/19 20:38:28 kls Exp $ * $Id: recording.c 5.6 2021/03/17 10:55:43 kls Exp $
*/ */
#include "recording.h" #include "recording.h"
@ -3115,9 +3115,32 @@ void cDoneRecordings::Append(const char *Title)
} }
} }
static const char *FuzzyChars = " -:";
static const char *SkipFuzzyChars(const char *s)
{
while (*s && strchr(FuzzyChars, *s))
s++;
return s;
}
bool cDoneRecordings::Contains(const char *Title) const bool cDoneRecordings::Contains(const char *Title) const
{ {
return doneRecordings.Find(Title) >= 0; for (int i = 0; i < doneRecordings.Size(); i++) {
const char *s = doneRecordings[i];
const char *t = Title;
while (*s && *t) {
s = SkipFuzzyChars(s);
t = SkipFuzzyChars(t);
if (*s != *t)
break;
s++;
t++;
}
if (!*s && !*t)
return true;
}
return false;
} }
// --- Index stuff ----------------------------------------------------------- // --- Index stuff -----------------------------------------------------------