<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p><br>
</p>
<div class="moz-cite-prefix">On 9/14/23 06:50, Philip Brady wrote:<br>
</div>
<blockquote type="cite"
cite="mid:AS8P193MB1464AA3512CE3E7E0BDC211ECDF7A@AS8P193MB1464.EURP193.PROD.OUTLOOK.COM">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style type="text/css" style="display:none;">P {margin-top:0;margin-bottom:0;}</style>
<div style="font-family: Calibri, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size: 11pt;
color: rgb(0, 0, 0);" face="Calibri, sans-serif"><b>From:</b>
mythtv-users <a class="moz-txt-link-rfc2396E" href="mailto:mythtv-users-bounces@mythtv.org"><mythtv-users-bounces@mythtv.org></a> on behalf
of Peter Bennett <a class="moz-txt-link-rfc2396E" href="mailto:pb.mythtv@gmail.com"><pb.mythtv@gmail.com></a><br>
<b>Sent:</b> 13 September 2023 00:33<br>
<b>To:</b> <a class="moz-txt-link-abbreviated" href="mailto:mythtv-users@mythtv.org">mythtv-users@mythtv.org</a>
<a class="moz-txt-link-rfc2396E" href="mailto:mythtv-users@mythtv.org"><mythtv-users@mythtv.org></a><br>
<b>Subject:</b> Re: [mythtv-users] API call
Guide/GetProgramList broken with port 6744.</font>
<div> </div>
</div>
<div>
<p><br>
</p>
<div class="x_moz-cite-prefix">On 9/12/23 13:13, Philip Brady
wrote:<br>
</div>
<blockquote type="cite">
<p class="x_x_MsoNoSpacing x_elementToProof"
style="margin-top:0px; margin-bottom:0px">
Sorry but I'm still confused.</p>
<p class="x_x_MsoNoSpacing x_elementToProof"
style="margin-top:0px; margin-bottom:0px">
" 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</p>
<p class="x_x_MsoNoSpacing x_elementToProof"
style="margin-top:0px; margin-bottom:0px">
<br>
</p>
<div class="x_x_MsoNoSpacing x_elementToProof
x_ContentPasted0" style="margin-top:0px; margin-bottom:0px">
I have always submitted text values for <Type> in <span
class="x_ContentPasted0" style="font-size: 12px; display:
inline !important; color: rgb(0, 0, 0); background-color:
rgb(255, 255, 255);">
</span>UpdateRecordSchedule. eg 'Record One';</div>
<div class="x_x_MsoNoSpacing x_elementToProof
x_ContentPasted0" style="margin-top:0px; margin-bottom:0px">
The text values are the same for both 7 and 8.</div>
<div class="x_x_MsoNoSpacing x_elementToProof
x_ContentPasted0" style="margin-top:0px; margin-bottom:0px">
Are you saying that it will also accept both text and
numeric values for <Type> ?</div>
<p class="x_x_MsoNoSpacing x_elementToProof"
style="margin-top:0px; margin-bottom:0px">
Phil</p>
<p class="x_x_MsoNoSpacing x_elementToProof"
style="margin-top:0px; margin-bottom:0px">
<br>
</p>
</blockquote>
<p>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 (<a
href="https://github.com/MythTV/mythtv/blob/eea10424c0bbe65133120ff2899d20d8068e07f1/mythtv/libs/libmythbase/recordingtypes.cpp#L101"
data-auth="NotApplicable" class="x_moz-txt-link-freetext
OWAAutoLink moz-txt-link-freetext"
id="OWAf7438661-df55-9f71-7c54-2d595bc30dcd"
moz-do-not-send="true">https://github.com/MythTV/mythtv/blob/eea10424c0bbe65133120ff2899d20d8068e07f1/mythtv/libs/libmythbase/recordingtypes.cpp#L101</a>
)</p>
<p>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.<br>
</p>
<p>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.</p>
<p class="elementToProof">Peter</p>
<p class="elementToProof" style="font-family: Calibri,
Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</p>
<p class="elementToProof" style="font-family: Calibri,
Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</p>
<div class="elementToProof" style="font-family: Calibri,
Helvetica, sans-serif; font-size: 12pt; margin-top: 0px;
margin-bottom: 0px; color: rgb(0, 0, 0);">
Hi Peter,
<div><br>
</div>
<div>Thanks for your replies.</div>
<div><br>
</div>
<div>Recording Type:</div>
<div>---------------</div>
<div>You say that "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."</div>
<div><br>
</div>
<div>That's clear but I'm still puzzled because that
distinction is not available to Dvr/UpdateRecordSchedule as
it demands a string value. </div>
<div>If I post an UpdateRecordSchedule with Type=Override
Recording will it impose type 7 action or type 8?</div>
<div>What should I post if I want the other one?</div>
<div><br>
</div>
</div>
</div>
</blockquote>
Pass "Override Recording" to override recording values. Pass "Do not
Record" to prevent a recording.<br>
<blockquote type="cite"
cite="mid:AS8P193MB1464AA3512CE3E7E0BDC211ECDF7A@AS8P193MB1464.EURP193.PROD.OUTLOOK.COM">
<div>
<div class="elementToProof" style="font-family: Calibri,
Helvetica, sans-serif; font-size: 12pt; margin-top: 0px;
margin-bottom: 0px; color: rgb(0, 0, 0);">
<div>
</div>
<div>The 'CurrentRecording' issue.</div>
<div>-----------------------------</div>
<div>Having made Status consistent between json and xml (even
if it is now numeric!) there is this further incompatibility
whereby StatusName gives 'CurrentRecording' but
RecStatusToString?RecStatus=3 gives 'Currently Recorded' for
upcoming recordings.</div>
<div><br>
</div>
<div>Existing json applications should be unaffected - they
will not look at StatusName anyway.</div>
<div><br>
</div>
<div>Existing API/xml applications using this family of calls
though are quite different. Between v33 and v34 they are
all thoroughly broken and authors are faced with THREE
changes already (more complex tags, missing recording info,
numeric status). Now seems as good time as any to impose
consistency by changing StatusName to give CurrentlyRecoded
rather than CurrentRecording as they will all have to review
their code anyway. It is of course something else to go in
the wiki to support them.</div>
<div>Please consider changing it.</div>
<div><br>
</div>
</div>
</div>
</blockquote>
Do you have a list of users of the API that we can notify. I have no
problem with changing it, but I think we should have agreement among
the developers. I suggest you create a ticket in github explaining
the problem. (<a class="moz-txt-link-freetext" href="https://github.com/MythTV/mythtv/issues">https://github.com/MythTV/mythtv/issues</a>) Developers
can review it and if there is agreement I can change it.<br>
<blockquote type="cite"
cite="mid:AS8P193MB1464AA3512CE3E7E0BDC211ECDF7A@AS8P193MB1464.EURP193.PROD.OUTLOOK.COM">
<div>
<div class="elementToProof" style="font-family: Calibri,
Helvetica, sans-serif; font-size: 12pt; margin-top: 0px;
margin-bottom: 0px; color: rgb(0, 0, 0);">
<div>
</div>
<div>Regards</div>
<div>Phil</div>
<br>
</div>
</div>
<br>
</blockquote>
</body>
</html>