[mythtv] [PATCH] - Additional duplicate detection controls

Chris Pinkham cpinkham at bc2va.org
Tue Jan 27 00:00:21 EST 2004


> This patch adds some more duplicate detection types. Namely:

Well, I guess I'll weigh in now. :)  I missed this message when it was
originally posted for some reason and didn't catch up on the thread until
I saw one of Bruce or David's responses.

I haven't had a chance to even look at this lately because I've been too
busy with work so I'm glad you took a shot at it.  If your code works,
then I don't see any reason not to apply it to CVS after 0.14 is released.
Thanks for taking the time to code this up.  I know I'll benefit from it
immediately. :)

> This patch adds some more duplicate detection types. Namely:
> If Deleted (Title and Subtitle match)
> If Deleted (Title and Description match)
> Never (Title and Subtitle match)
> Never (Title and Description match)

Just to give you an idea of what I was picturing when I posted a description
to the list a month or two ago.  It would be per-scheduled-recording settings.
The current 'recorddups' field would go away and there would be 2 new fields.

"Duplicate Check Method" would specify what to check for duplicates.  
I was even thinking this field could even be a bitmask which would make
checking things easier.  Possible options would be:

	- No Duplicate Checking    (DUP_NONE       = 0x01)
	- Subtitle                 (DUP_SUB        = 0x02)
	- Description              (DUP_DESC       = 0x04)
	- Subtitle & Description   (DUP_SUB_DESC   = 0x06)
	- Episode number (future)  (DUP_EPISODE    = 0x08)

So you could end up with code like this in ProgramInfo::IsSameProgram():

	if ((title = other.title &&
		(subtitle.length() > 2) &&
		(description.length() > 2) &&
		((dupCheckMethod & DUP_SUB) &&
		 (subtitle = other.subtitle)) &&
		((dupCheckMethod & DUP_DESC) &&
		 (description = other.description)) &&
		((dupCheckMethod & DUP_EPISODE) &&
		 (episode_number = other.episode_number)))
		return true;
	else
		return false;

"Check for Duplicates In" field would specify where to checck.  Options would
be:

	- Existing Recordings Only
	- All Previous Recordings

I think adding items to the dropdown box takes up less real-estate on the
Advanced Recording Options screen but it might be easier to understand in
the long run if there were 2 fields/settings as described above.

> Hope I approached it correctly. Comments are welcome, but I've been 
> using it and it seems to work fine.
> 
> Joel Feenstra

Anyway, after typing all that... :)  If you think any of this makes more
sense and feel like changing things feel free, otherwise I'll plan on
committing your current patch after v0.14 is released.  Like Bruce said,
if it works great. :)  I won't complain if something is implemented
differently than I would have done as long as it works correctly.

<offtopic>
This gives me more time to work on what I'm preliminarily
calling "Recording Groups" for the playbackbox so I don't have to wade
through all my wife's Trading Spaces episodes in order to get to my
Monster Garage episodes.  Already have it working partially, hope to have it
ready to go in early after 0.14.
</offtopic>

Thanks,
Chris



More information about the mythtv-dev mailing list