[mythtv] [PATCH] Control duplicates by channel ID

David Shay david at shay.net
Fri Aug 3 04:49:54 UTC 2007


Attached is a patch that controls duplicates by channel ID.

It adds a new option to the Scheduling Options recording rule screen
that can be set to either "Match duplicates Ignoring Channel ID"
(which is the current behavior), or the new behavior "Match duplicates
considering channel ID".

You can then setup multiple record rules that either specify certain
channels or prefer certain inputs, and if the new match duplicates
setting is selected, you will get multiple copies of the same show.
My primary purpose for the patch is to be able to record both a
high-def and low-def version of the same show, but there are many
other uses as well as pointed out in other threads.

I've created a new field called "dupchanid" in programinfo that
controls this with two new constant values -- kDupIgnoreChanID and
kDupConsiderChanID.  Yes, it could have been a boolean, but I
purposely did it this way so that it could be extensible later to
other things, such as just source ID or some other variant just by
setting new values. (perhaps the field shouldn't be called dupchanid,
then -- let me know if you've got a better name for it)  I've added
these to the to and from string lists and updated the protocol to
version 36 with this patch.  There is a a new field called dupchanid
in the record table as well, so an update to dbcheck.cpp is included
as well.

The main changes to get this implemented were in the big scheduler
query in scheduler.cpp as well as in IsSameProgram in programinfo.cpp.

I've tested this with and without programid's, and for both programs
on at the same time as well as those that are on at different times,
and it "works for me".  Please test and give me feedback.

Thanks.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dupchanid.patch.gz
Type: application/x-gzip
Size: 3997 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20070802/f436fd92/attachment.bin 


More information about the mythtv-dev mailing list