[mythtv] Services bug with dupin field

Peter Bennett pb.mythtv at gmail.com
Sat Aug 22 19:00:29 UTC 2020

On 8/22/20 1:07 PM, David Engel wrote:
> On Sat, Aug 22, 2020 at 11:16:11AM -0400, Peter Bennett wrote:
>> On 8/21/20 9:09 PM, David Engel wrote:
>>> On Fri, Aug 21, 2020 at 02:48:27PM -0400, Peter Bennett wrote:
>>>> Any comments or suggestions? Let me know.
>>> I think the best solutino is to split the new episodes only/new and
>>> repeat value out into a totally new value.  The trick will be to
>>> maintain as much backward compatibility as you can.
>> So, change the service apis so that Dupin returns only "Current Recordings"
>> , "Previous Recordings" or "All Recordings" by first removing the "New
>> episodes" flag if present. Then add a new tag called "NewEpisodesOnly" with
>> boolean true/false value, based on that flag.
>> The new tag should not affect existing users who should just ignore it.
>> In the AddRecordSchedule method if they do submit value "New Episodes Only"
>> for Dupin and leave out the "NewEpisodesOnly" tag, then continue with what
>> it would have done before, set only that value with nothing for current,
>> previous or all recordings (for backward compatibility).
>> Does this sound good?
> Mostly.  If no information for current/previous recordings is provided
> (i.e. new episodes only in dupin and no new tag), set both current and
> previous recordings in dupin.  That "fixes" the old behavior as I
> consider it a bug.
> David

OK, done.

I changed the new tag to "NewEpisOnly" because "NewEpisodesOnly" is a 
longer name than any other tag.

See attached patch, lightly tested on GetRecordScheduleList, not tested 
on update or add. More testing needed before committing it.

There are unresolved bugs in recordingtypes.cpp in 
toString(RecordingDupInType) and toDescription(RecordingDupInType) which 
will not return correct results when "New Episodes Only" is selected. I 
don't know how these are used, I could change them to combine the two 
values (for example "All Recordings, New Episodes Only"), but I don't 
know if that is appropriate. The caller may not expect that.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: 20200822_1440_dupin fixes.patch
Type: text/x-patch
Size: 13120 bytes
Desc: not available
URL: <http://lists.mythtv.org/pipermail/mythtv-dev/attachments/20200822/cc418f16/attachment.bin>

More information about the mythtv-dev mailing list