[mythtv-users] API call Guide/GetProgramList broken with port 6744.

Peter Bennett pb.mythtv at gmail.com
Wed Sep 13 00:33:27 UTC 2023


On 9/12/23 13:13, Philip Brady wrote:
>
> Sorry but I'm still confused.
>
> " 7 and 8 are both still in use. The are both overrides, but different 
> types of override. 7 is for a rule that overrides a specific recording 
> to change some values, for example to record one episode into a 
> different recording group. 8 is for a rule that overrides a rule and 
> tells MythTV not to record a specific showing of a series. It would 
> make more sense if 8 returned a string like Don't Record. The 
> GetRecordSchedule API returns "Do not Record" if the value is 8.2
>
>
> I have always submitted text values for <Type> in 
> UpdateRecordSchedule.  eg 'Record One';
> The text values are the same for both 7 and 8.
> Are you saying that it will also accept both text and numeric values 
> for <Type> ?
>
> Phil
>
>
UpdateRecordSchedule takes a string for type, not a number. It converts 
the string to a number for its internal use. It uses recTypeFromString 
to do that 
(https://github.com/MythTV/mythtv/blob/eea10424c0bbe65133120ff2899d20d8068e07f1/mythtv/libs/libmythbase/recordingtypes.cpp#L101 
)

You can see from that routine that it allows various options, for 
example "record all" or "all" (lower case, upper case or mixed) will 
convert to kAllRecord (4). Note also that the default value if you 
specify something that is not valid, is kDontRecord. If a numeric value 
was supplied it would be defaulted to kDontRecord.

A lot of this is not documented, except by looking in the code. Also a 
lot of it is not ideal. I can fix stuff that is broken or wrong, but I 
want to avoid doing anything that will break somebody else's use of the 
APIs.

Peter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20230912/7f8c558f/attachment.htm>


More information about the mythtv-users mailing list