Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
8 changed files
with
564 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.