Specific to your example, you're describing exclusive or, also known as XOR. "Match on either one, but not both". You can emulate XOR with:
(A and Not(B)) or (B and Not(A))
In MC expression language that should work out to:
([Name]="Doctor Who" and -[Series]="Doctor Who") or ([Series]="Doctor Who" and -[Name]="Doctor Who")
Thanks Brian for reminding me of this solution. My skills in this area are a little rusty, so that is a big help. I'll have to get up to speed again with these sorts of tricks.
Yaobing, that is all great. The "is not" operator should help with some rules. Sensible name change for the button as well.
I have implemented your version of the rule I was looking for, which took me a little while to understand the logic of, and it works fine in selecting Doctor Who recordings. This one, which could be expressed as ((A or B) and (Not(A) or Not(B)));
([Name]="Doctor Who" or [Series]="Doctor Who") (-[Name]="Doctor Who" or -[Series]="Doctor Who")
I can see that there is going to be a little bit of forum support required to get people up to speed on this (including me!), but that is okay.
By the way, RoderickGI, didn't you suggest that we put program name in the Series field (when there is no separate Series name) if a show is flagged as episodic? Would that automatically be excluded by the above rules?
Yes, that was my suggestion, so that a program from a Series would at least get a value in [Series] that was a little meaningful, rather than being an orphaned recording. So if a Doctor Who episode had an EPG <title> = "Doctor Who: The Zygon Invasion", at least a new Series of that name be created, with the same Episode name. This would help in cleaning up recordings. The program would appear in Theatre View with the new Series name, rather than never appear in that view, and be lost in Recent recordings, unless I went looking.
Also correct, implementing that suggestion would break the rules above. But I think it is more important that a misidentified episode be visible in the Theatre View Series view, rather than have it never appear in that view. Maybe you could allow a rule of -[series]=[name] to identify when that happens. It doesn't look like the rules can use field/tag names that way at the moment.
The complexity is just trying to get around poor EPG data, and avoid recording too many repeats. Maybe I should just be looking at using Expressions in Tagging section of Recording Rules instead of asking you implement that suggestion. To be honest I haven't checked to see if expressions work in that area, with custom tagging. Must check.
BTW, congratulations on the design of how the rule work between version of MC. I installed MC21.0.18 on my HTPC, changed rules, then reviewed and edited the same rules on my Workstation PC running MC21.0.16. Nothing bad happened. The functionality in both version co-existed quite well. Even editing an saving a .18 rule in .16 worked fine, just changing the rule name back to the program name, which was fine.
Further rambling. Not essential reading.In fact take a look at the image I have attached. You can see that "Doctor Who" is shown on the primary channel (2) with a full Series, Name, and Description. It is then repeated on the secondary channel (22) with the same details, and then repeated again with a Description of just "Doctor Who".
A. If my suggested change hadn't been implemented, I would use a rule, including an "is not" operator, of;
([Name]="Doctor Who" or [Series]="Doctor Who") (-[Name]="Doctor Who" or -[Series]="Doctor Who") (-[Description]=[Doctor Who])
B. If my suggested change had been implemented, I would use a simplified rule of;
([Series]="Doctor Who") (-[Description]=[Doctor Who])
Which would mean more programs are recorded, and so probably more repeats would be recorded. But at least each recording would be put into a Series that had some meaning.
At present I get some Doctor Who recordings that have no Series, and so are orphans. For example;
EPG <title> = Doctor Who: The Zygon Invasion ==> [Name] = Doctor Who: The Zygon Invasion, [Series] remains empty.
EPG <subtitle> = (Blank) ==>
EPG <description> = (proper description) ==> [Description] = (proper description)
Rules A and B would record that program, but it would not be associated with the "Doctor Who" series, but would instead create a new [Series] = "Doctor Who: The Zygon Invasion"
Another variation of EPG data is;
EPG <title> = Doctor Who ==> [Series] = Doctor Who
EPG <subtitle> = Doctor Who: The Zygon Invasion ==> [Name] = Doctor Who: The Zygon Invasion
EPG <description> = (proper description) ==> [Description] = (proper description)
The above program would be rejected by rule A, which would probably be okay, but accepted by rule B, which is erring on the side of being conservative but still probably okay. Normally those errors are only made on repeat showings, or complete repeats of a Season, which I probably already have.
Anyway, now that we have the more complex recording rules, I can look more critically at the EPG data I am getting and make up better rules. I just kept it simple before and over-recorded as I didn't have the functionality to cope with EPG deficiencies.