mediaitem

class openlp.plugins.media.lib.mediaitem.MediaMediaItem(parent, plugin)[source]

Bases: openlp.core.lib.mediamanageritem.MediaManagerItem, openlp.core.common.registryproperties.RegistryProperties

This is the custom media manager item for Media Slides.

add_custom_context_actions()[source]
add_end_header_bar()[source]

Adds buttons to the end of the header bar.

add_list_view_to_toolbar()[source]

Creates the main widget for listing items.

add_optical_clip(optical)[source]

Add a optical based clip to the mediamanager, called from media_clip_selector_form.

Parameters:optical – The clip to add.
add_start_header_bar()[source]

Adds buttons to the start of the header bar.

generate_slide_data(service_item, item=None, xml_version=False, remote=False, context=2)[source]

Generate the slide data. Needs to be implemented by the plugin.

Parameters:
  • service_item – The service item to be built on
  • item – The Song item to be used
  • xml_version – The xml version (not used)
  • remote – Triggered from remote
  • context – Why is it being generated
get_list(media_type=1)[source]

Get the list of media, optional select media type.

Parameters:media_type – Type to get, defaults to audio.
Returns:The media list
initialise()[source]

Initialize media item.

load_list(media, target_group=None)[source]

Load the media list

Parameters:
  • media – The media
  • target_group
media_add_to_service
media_go_live
on_delete_click()[source]

Remove a media item from the list.

on_load_optical()[source]

When the load optical button is clicked, open the clip selector window.

on_replace_click()[source]

Called to replace Live background with the media selected.

on_reset_click()[source]

Called to reset the Live background with the media selected,

static override_player_changed(index)[source]

The Player has been overridden

Parameters:index – Index
populate_display_types()[source]

Load the combobox with the enabled media players, allowing user to select a specific player if settings allow.

rebuild_players()[source]

Rebuild the tab in the media manager when changes are made in the settings.

required_icons()[source]

Set which icons the media manager tab should show

retranslateUi()[source]

This method is called automatically to provide OpenLP with the opportunity to translate the MediaManagerItem to another language.

search(string, show_error)[source]

Performs a search for items containing string

Parameters:
  • string – String to be displayed
  • show_error – Should the error be shown (True)
Returns:

The search result.

setup()[source]

Allow early setup to be mocked.

setup_item()[source]

Do some additional setup.

video_background_replaced()[source]

Triggered by main display on change of serviceitem.