forked from openlp/openlp
Media cleaned up
This commit is contained in:
parent
836886e541
commit
9773afc61c
@ -207,8 +207,7 @@ class ImageMediaItem(MediaManagerItem):
|
|||||||
"""
|
"""
|
||||||
Recursively deletes a group and all groups and images in it.
|
Recursively deletes a group and all groups and images in it.
|
||||||
|
|
||||||
``image_group``
|
:param image_group: The ImageGroups instance of the group that will be deleted.
|
||||||
The ImageGroups instance of the group that will be deleted.
|
|
||||||
"""
|
"""
|
||||||
images = self.manager.get_all_objects(ImageFilenames, ImageFilenames.group_id == image_group.id)
|
images = self.manager.get_all_objects(ImageFilenames, ImageFilenames.group_id == image_group.id)
|
||||||
for image in images:
|
for image in images:
|
||||||
|
@ -131,6 +131,11 @@ class MediaMediaItem(MediaManagerItem):
|
|||||||
self.display_type_combo_box.currentIndexChanged.connect(self.override_player_changed)
|
self.display_type_combo_box.currentIndexChanged.connect(self.override_player_changed)
|
||||||
|
|
||||||
def override_player_changed(self, index):
|
def override_player_changed(self, index):
|
||||||
|
"""
|
||||||
|
The Player has been overridden
|
||||||
|
|
||||||
|
:param index: Index
|
||||||
|
"""
|
||||||
player = get_media_players()[0]
|
player = get_media_players()[0]
|
||||||
if index == 0:
|
if index == 0:
|
||||||
set_media_players(player)
|
set_media_players(player)
|
||||||
@ -178,9 +183,15 @@ class MediaMediaItem(MediaManagerItem):
|
|||||||
'the media file "%s" no longer exists.') % filename)
|
'the media file "%s" no longer exists.') % filename)
|
||||||
|
|
||||||
def generate_slide_data(self, service_item, item=None, xml_version=False, remote=False,
|
def generate_slide_data(self, service_item, item=None, xml_version=False, remote=False,
|
||||||
context=ServiceItemContext.Live):
|
context=ServiceItemContext.Service):
|
||||||
"""
|
"""
|
||||||
Generate the slide data. Needs to be implemented by the plugin.
|
Generate the slide data. Needs to be implemented by the plugin.
|
||||||
|
|
||||||
|
:param service_item: The service item to be built on
|
||||||
|
:param item: The Song item to be used
|
||||||
|
:param xml_version: The xml version (not used)
|
||||||
|
:param remote: Triggered from remote
|
||||||
|
:param context: Why is it being generated
|
||||||
"""
|
"""
|
||||||
if item is None:
|
if item is None:
|
||||||
item = self.list_view.currentItem()
|
item = self.list_view.currentItem()
|
||||||
@ -269,6 +280,12 @@ class MediaMediaItem(MediaManagerItem):
|
|||||||
|
|
||||||
def load_list(self, media, target_group=None):
|
def load_list(self, media, target_group=None):
|
||||||
# Sort the media by its filename considering language specific characters.
|
# Sort the media by its filename considering language specific characters.
|
||||||
|
"""
|
||||||
|
Load the media list
|
||||||
|
|
||||||
|
:param media: The media
|
||||||
|
:param target_group:
|
||||||
|
"""
|
||||||
media.sort(key=lambda file_name: get_locale_key(os.path.split(str(file_name))[1]))
|
media.sort(key=lambda file_name: get_locale_key(os.path.split(str(file_name))[1]))
|
||||||
for track in media:
|
for track in media:
|
||||||
track_info = QtCore.QFileInfo(track)
|
track_info = QtCore.QFileInfo(track)
|
||||||
|
@ -33,14 +33,6 @@ from openlp.core.common import Settings, UiStrings, translate
|
|||||||
from openlp.core.lib import SettingsTab
|
from openlp.core.lib import SettingsTab
|
||||||
|
|
||||||
|
|
||||||
class MediaQ_check_box(QtGui.QCheckBox):
|
|
||||||
"""
|
|
||||||
MediaQ_check_box adds an extra property, playerName to the Q_check_box class.
|
|
||||||
"""
|
|
||||||
def setPlayerName(self, name):
|
|
||||||
self.playerName = name
|
|
||||||
|
|
||||||
|
|
||||||
class MediaTab(SettingsTab):
|
class MediaTab(SettingsTab):
|
||||||
"""
|
"""
|
||||||
MediaTab is the Media settings tab in the settings dialog.
|
MediaTab is the Media settings tab in the settings dialog.
|
||||||
|
Loading…
Reference in New Issue
Block a user