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:
parent
36a833053b
commit
7ffc1a5efe
5
HISTORY
5
HISTORY
@ -9578,7 +9578,7 @@ Video Disk Recorder Revision History
|
||||
given (reported by Manuel Reimer).
|
||||
- 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).
|
||||
- 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
|
||||
removed in a future version. See the comments in filter.h for a description on
|
||||
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
4
MANUAL
@ -636,6 +636,10 @@ following the matching pattern. There are three macros that can be used here:
|
||||
{>} everything after the matching pattern
|
||||
{=} 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
|
||||
|
||||
The "Select folder" menu, which can be accessed by pressing the "Red" key in
|
||||
|
27
recording.c
27
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.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"
|
||||
@ -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
|
||||
{
|
||||
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 -----------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user