[mythtv] SpecialRecordingGroups hard coded IDs

Stuart Auchterlonie stuarta at squashedfrog.net
Thu May 2 14:13:02 UTC 2019


On 01/05/2019 16:54, mythtv wrote:
> 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
> 

We already have the function GetRecgroupId, see [1]. Does that not do
what you were thinking of?

[1] -
https://github.com/MythTV/mythtv/blob/master/mythtv/libs/libmythtv/recordinginfo.cpp#L1603-L1617

> 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.
> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev at mythtv.org
> http://lists.mythtv.org/mailman/listinfo/mythtv-dev
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org



More information about the mythtv-dev mailing list