Please sign in to comment.
Rework recording rule handling in services API.
Thanks to tafy/dev-team%40tikinou.com providing the initial patch and testing the end result. The existing AddRecordSchedule() and new UpdateRecordSchedule() calls essentially take complete, fully-specified rules and sanity check them before saving. AddRecordSchedule() is used to add new rules and UpdateRecordSchedule() is used to update existing rules. GetRecordSchedule() is changed to conveniently provide rules suitable for later calls to AddRecordSchedule() and UpdateRecordSchedule(). When given a valid RecordId, GetRecordSchedule() returns that rule. When given a Template name, GetRecordSchedule() returns an empty rule initialized with that template. When given a ChanId and StartTime, GetRecordSchedule() returns the rule for that program or a new one if no rule currently exists. If the MakeOverride parameter is true, the returned rule for the program will converted to an override rule if needed. Clients should always call GetRecordSchedule() with the appropriate parameters before modifying the rule and then calling AddRecordSchedule() or UpdateRecordSchedule(). In this way, clients do not need to know all of the details on how to initialize rules or update them for specific programs. Fixes #11495
- Loading branch information...
Showing with 564 additions and 70 deletions.
- +1 −1 mythtv/libs/libmythbase/mythversion.h
- +8 −13 mythtv/libs/libmythservicecontracts/datacontracts/recRule.h
- +60 −4 mythtv/libs/libmythservicecontracts/services/dvrServices.h
- +176 −0 mythtv/libs/libmythtv/recordingrule.cpp
- +2 −0 mythtv/libs/libmythtv/recordingrule.h
- +257 −46 mythtv/programs/mythbackend/services/dvr.cpp
- +58 −3 mythtv/programs/mythbackend/services/dvr.h
- +2 −3 mythtv/programs/mythbackend/services/serviceUtil.cpp
Oops, something went wrong.