[mythtv] SpecialRecordingGroups hard coded IDs

mythtv mythtv at mdabbs.org
Wed May 1 15:54:15 UTC 2019


I know this isn't a high priority item but I thought I'd bring it up 
here, at least for discussion.

My MySQL instance is setup so that the auto-increment values go up by 2 
instead of 1, so my recgroups table has IDs that are all odd. I have 
always had to adjust recordinginfo.h and the SpecialRecordingGroups to 
match my DB values. I was thinking of doing a patch where the instances 
where special IDs are used, they are retrieved from the DB instead of 
using the hard-coded values. They aren't used in very many places and I 
was just going to add some static members to recordinginfo.cpp to 
retrieve them, like:

RecordingInfo::GetDefaultRecGroupId, RecordingInfo::GetLiveTvRecGroupId 
and RecordingInfo::GetDeletedRecGroupId

So wherever RecordingInfo::kXXXRecGroup is used would be replaced with 
the static methods. I think that would solve my problem without being 
too much of an intrusive change to the codebase.

Another issue might be with me submitting a decent patch. I'm only 
running fixes/29, but I think I'd only be modifying a few files. I've 
never contributed to open source before and am not great with git or 
creating patches. I might need some help there.


More information about the mythtv-dev mailing list