|
Sjq4EventListeners
Details on the behaviour of the SJQv4 event listeners
Phase-Implementation
IntroductionSJQv4 introduces a new way to queue up tasks to be executed. Gone is the periodic scanning of SageTV objects, filtering them against the server ruleset and then loading matches into the queue. Instead, SJQv4 listens for SageTV 7.0 core events and acts upon them. Supported Event ListenersThe SJQv4 server will listen for and respond to the following core events: RecordingStarted/RecordingSegmentAddedAnytime SJQ receives a RecordingStarted or a RecordingSegmentAdded event it will do the following:
MediaFileImportedAnytime SJQ receives a MediaFileImported event it will do the following:
SystemMessagePostedAnytime SJQ receives a SystemMessagePosted event it will do the following:
Reading and Manipulating Task ListsSJQ provides various utility methods for reading and manipulating the task lists. Basically, you should always read the string from the DataStore or from the Sage object properties, as appropriate, and then use the com.google.code.sagetvaddons.sjq.utils.TaskList class for manipulating the task list. If you make changes and need to save them then just use the returned string from the methods in this class. There is no need to manually split the string or try to directly add/edit the string of task ids, etc. The TaskList class should be able to perform all required operations, if not then ask for the ops that are missing. Other Event Listeners Can Be AddedOther event listeners can be added as demand for them arises. For now, however, I think these three are going to cover the majority of users' needs. | |