Yaobing I put some more thoughts into this overnight and I believe what we need is an OR condition between the fields and not an AND...
I don't agree with any of that. If you as a human being were shown the following values for a program, how would you, internally, decide if they were the same program, given that you had no access to additional information? Think carefully about how you would recognise they were the same.
"Series name", "Episode Name", "Season number", "Episode number" and "Description".
(I note that you seem to have combined "Series and Season [number I assume]", and "Series and Episode [number I assume]", when they are separate fields, vary separately, and can be tested and add value separately. I don't know why you did that.)
For me, if I see the same "Series name" and "Episode Name", I am pretty sure that it is the same program. The same if I see "Series name", "Season number" and "Episode number" match. If "Series name", "Episode Name", "Season number" and "Episode number" match, I would be positive.
However, if I saw two programs where the "Description" matched (character for character, not informational content) but the "Series name", "Episode Name", "Season number", "Episode number"
or any subset of those fields did not match, I would not be sure that it was the same program,
unless I could read the description and use my logic to determine if it was the same. The computer can't read the description to decide if the program is likely to be the same. It can just compare the characters.
For example, if the description was "Brauns vs Albatros at the Waka 15 September 2015" there is actually a lot of information in there, and it is quite unique. A human would interpret that as a sports event between two teams on a specific day at a specific location. Even if the other fields didn't match, a human would tend to think that the two program were the same, but would probably still check, since a description may have been carried over from a previous program in error, if the other fields don't match. In effect, as a human being, you are giving a higher weighting to the description because you can interpret the content. A computer can't do that. Nor can it check other sources, just to confirm.
There is also the problem that standardised descriptions are often used for episodes of a series, at least in my EPG data, so I would get positive matches on "Description" all the time, for completely different episodes.
Then besides all of the above, there is the issue of what are the consequences of getting it wrong?
If the rules resulted in a false positive match, then the second program would not be recorded, and a recording would be missed.
If the rules resulted in a false negative match, then the second program would be recorded when it was not required, as it was actually a duplicate of the first program.
Which result would you rather have in your DVR software? I know I will go for the false negative all the time, as it means I will always get recordings of the program I want, and sometimes a duplicate. That is much better that never getting any duplicate recordings, but sometimes missing a recording I want.
Your suggestion would result in more false positive matches, and hence missed recordings.
Other repeats didn't show why this one showed up to be recorded remains unclear...
Yaobing has said that he saw a problem in this area, and will look at it. Did you check all the attributes of each occurrence of the repeated program, to see if there was any difference? Finding a difference may help Yaobing find the cause.