serviceitem provides the service item functionality including the
type and capability of an item.
Provides an enumeration of a service item’s capabilities
- The capability to allow the ServiceManager to add to the preview tab when making the previous item live.
- The capability to allow the ServiceManager to allow the item to be edited
- The capability to allow the ServiceManager to allow the item to be reordered.
- Determines is the service_item needs a Media Player
- The capability to allow the SlideController to allow the loop processing.
- The capability to allow the ServiceManager to add leaves to the item
- The capability to remove lines breaks in the renderer
- The capability to update MediaManager when a service Item is loaded.
- Not Used
- The capability to tell the SlideController the service Item has a different display.
- Being Removed and decommissioned.
- The capability to tell the ServiceManager that a change to start time is possible.
- The capability to tell the renderer that Soft Break is allowed
- The capability to tell the renderer that it can split words is allowed
- That a audio file is present with the text.
- The capability to ignore the do not play if display blank flag.
- The capability to edit the title of the item
- Determines is the service_item is based on an optical device
- The item contains ‘displaytitle’ on every frame which should be preferred over ‘title’ when displaying the item
- The item contains ‘notes’
- The item has related thumbnails available
The service item is a base class for the plugins to use to interact with the service manager, the slide controller, and the projection screen compositor.
Add an ItemCapability to a ServiceItem
Parameters: capability – The capability to add
add_from_command(path, file_name, image, display_title=None, notes=None)¶
Add a slide from a command.
- path – The title of the slide in the service item.
- file_name – The title of the slide in the service item.
- image – The command of/for the slide.
- display_title – Title to show in gui/webinterface, optional.
- notes – Notes to show in the webinteface, optional.
add_from_image(path, title, background=None, thumbnail=None)¶
Add an image slide to the service item.
- path – The directory in which the image file is located.
- title – A title for the slide in the service item.
- background –
- thumbnail – Optional alternative thumbnail, used for remote thumbnails.
Add a text slide to the service item.
- raw_slide – The raw text of the slide.
- verse_tag –
Add an icon to the service item. This is used when displaying the service item in the service manager.
Parameters: icon – A string to an icon in the resources or on disk.
Returns the title of the service item.
Returns the path of the raw frame
Returns the title of the raw frame
Returns the frames for the ServiceItem
Returns the start and finish time for a media item
Returns the correct frame for a given list and renders it if required.
Parameters: row – The service item slide to be returned
This method returns some text which can be saved into the service file to represent this item.
Tell the caller if a ServiceItem has a capability
Parameters: capability – The capability to test for
Confirms if the ServiceItem is a command
Confirms if the ServiceItem is an image
Confirms if the ServiceItem is media
Confirms if the ServiceItem is text
Updates the unique_identifier with the value from the original one The unique_identifier is unique for a given service item but this allows one to replace an original version.
Parameters: other – The service item to be merged with
Returns if there are any frames in the service item
Remove the specified frame from the item
Remove invalid frames, such as ones where the file no longer exists.
The render method is what generates the frames for the screen and obtains the display information from the renderer. At this point all slides are built for the given display size.
Parameters: provides_own_theme_data – This switch disables the usage of the item’s theme. However, this is disabled by default. If this is used, it has to be taken care, that the renderer knows the correct theme data. However, this is needed for the theme manager.
This method takes a service item from a saved service file (passed from the ServiceManager) and extracts the data actually required.
- service_item – The item to extract data from.
- path – Defaults to None. This is the service manager path for things which have their files saved with them or None when the saved service is lite and the original file paths need to be preserved.
Stores the media length of the item
Parameters: length – The length of the media item
updates the theme in the service item
Parameters: theme – The new theme to be replaced in the service item
Confirms if the ServiceItem uses a file
Validates a service item to make sure it is valid