forked from openlp/openlp
bugfixing
This commit is contained in:
parent
1c35195f6a
commit
087a1f7600
@ -27,13 +27,13 @@
|
|||||||
|
|
||||||
from openlp.core.ui.media import MediaState
|
from openlp.core.ui.media import MediaState
|
||||||
|
|
||||||
class MediaAPI(object):
|
class MediaPlayer(object):
|
||||||
"""
|
"""
|
||||||
A generic media API class to provide OpenLP with a pluggable media display
|
This is the base class media Player class to provide OpenLP with a pluggable media display
|
||||||
framework.
|
framework.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, parent, name=u'media_api'):
|
def __init__(self, parent, name=u'media_player'):
|
||||||
self.parent = parent
|
self.parent = parent
|
||||||
self.name = name
|
self.name = name
|
||||||
self.available = self.check_available()
|
self.available = self.check_available()
|
||||||
@ -47,7 +47,7 @@ class MediaAPI(object):
|
|||||||
|
|
||||||
def check_available(self):
|
def check_available(self):
|
||||||
"""
|
"""
|
||||||
API is available on this machine
|
Player is available on this machine
|
||||||
"""
|
"""
|
||||||
return False
|
return False
|
||||||
|
|
@ -59,7 +59,7 @@ class Display(QtGui.QGraphicsView):
|
|||||||
QtGui.QGraphicsView.__init__(self, parent)
|
QtGui.QGraphicsView.__init__(self, parent)
|
||||||
self.isLive = live
|
self.isLive = live
|
||||||
self.controller = controller
|
self.controller = controller
|
||||||
self.screen = None
|
self.screen = {}
|
||||||
self.plugins = PluginManager.get_instance().plugins
|
self.plugins = PluginManager.get_instance().plugins
|
||||||
self.setViewport(QtOpenGL.QGLWidget())
|
self.setViewport(QtOpenGL.QGLWidget())
|
||||||
|
|
||||||
|
@ -62,5 +62,4 @@ class MediaInfo(object):
|
|||||||
end_time = 0
|
end_time = 0
|
||||||
media_type = MediaType()
|
media_type = MediaType()
|
||||||
|
|
||||||
from media_api import MediaAPI
|
|
||||||
from mediacontroller import MediaController
|
from mediacontroller import MediaController
|
||||||
|
@ -31,8 +31,9 @@ import sys, os,time
|
|||||||
from PyQt4 import QtCore, QtGui, QtWebKit
|
from PyQt4 import QtCore, QtGui, QtWebKit
|
||||||
|
|
||||||
from openlp.core.lib import OpenLPToolbar, Receiver, translate
|
from openlp.core.lib import OpenLPToolbar, Receiver, translate
|
||||||
|
from openlp.core.lib.media_player import MediaPlayer
|
||||||
from openlp.core.lib.ui import UiStrings, critical_error_message_box
|
from openlp.core.lib.ui import UiStrings, critical_error_message_box
|
||||||
from openlp.core.ui.media import MediaAPI, MediaState, MediaInfo, MediaType
|
from openlp.core.ui.media import MediaState, MediaInfo, MediaType
|
||||||
from openlp.core.utils import AppLocation
|
from openlp.core.utils import AppLocation
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
@ -40,20 +41,20 @@ log = logging.getLogger(__name__)
|
|||||||
class MediaController(object):
|
class MediaController(object):
|
||||||
"""
|
"""
|
||||||
The implementation of the Media Controller. The Media Controller adds an own
|
The implementation of the Media Controller. The Media Controller adds an own
|
||||||
class for every API. Currently these are QtWebkit, Phonon and planed Vlc.
|
class for every Player. Currently these are QtWebkit, Phonon and planed Vlc.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, parent):
|
def __init__(self, parent):
|
||||||
self.parent = parent
|
self.parent = parent
|
||||||
self.mediaApis = {}
|
self.mediaPlayers = {}
|
||||||
self.controller = []
|
self.controller = []
|
||||||
self.overridenApi = ''
|
self.overridenPlayer = ''
|
||||||
self.curDisplayMediaAPI = {}
|
self.curDisplayMediaPlayer = {}
|
||||||
# Timer for video state
|
# Timer for video state
|
||||||
self.timer = QtCore.QTimer()
|
self.timer = QtCore.QTimer()
|
||||||
self.timer.setInterval(200)
|
self.timer.setInterval(200)
|
||||||
self.withLivePreview = False
|
self.withLivePreview = False
|
||||||
self.check_available_media_apis()
|
self.check_available_media_players()
|
||||||
# Signals
|
# Signals
|
||||||
QtCore.QObject.connect(self.timer,
|
QtCore.QObject.connect(self.timer,
|
||||||
QtCore.SIGNAL("timeout()"), self.video_state)
|
QtCore.SIGNAL("timeout()"), self.video_state)
|
||||||
@ -74,7 +75,7 @@ class MediaController(object):
|
|||||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||||
QtCore.SIGNAL(u'media_unblank'), self.video_unblank)
|
QtCore.SIGNAL(u'media_unblank'), self.video_unblank)
|
||||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||||
QtCore.SIGNAL(u'media_override_api'), self.override_api)
|
QtCore.SIGNAL(u'media_override_player'), self.override_player)
|
||||||
# Signals for background video
|
# Signals for background video
|
||||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||||
QtCore.SIGNAL(u'songs_hide'), self.video_hide)
|
QtCore.SIGNAL(u'songs_hide'), self.video_hide)
|
||||||
@ -83,24 +84,24 @@ class MediaController(object):
|
|||||||
|
|
||||||
def register_controllers(self, controller):
|
def register_controllers(self, controller):
|
||||||
"""
|
"""
|
||||||
Register each media API controller (Webkit, Phonon, etc) and store for
|
Register each media Player controller (Webkit, Phonon, etc) and store for
|
||||||
later use
|
later use
|
||||||
"""
|
"""
|
||||||
if controller.check_available():
|
if controller.check_available():
|
||||||
self.mediaApis[controller.name] = controller
|
self.mediaPlayers[controller.name] = controller
|
||||||
|
|
||||||
def check_available_media_apis(self):
|
def check_available_media_players(self):
|
||||||
"""
|
"""
|
||||||
Check to see if we have any media API's available. If Not do not install
|
Check to see if we have any media Player's available. If Not do not install
|
||||||
the plugin.
|
the plugin.
|
||||||
"""
|
"""
|
||||||
log.debug(u'check_available_media_apis')
|
log.debug(u'check_available_media_players')
|
||||||
controller_dir = os.path.join(
|
controller_dir = os.path.join(
|
||||||
AppLocation.get_directory(AppLocation.AppDir),
|
AppLocation.get_directory(AppLocation.AppDir),
|
||||||
u'core', u'ui', u'media')
|
u'core', u'ui', u'media')
|
||||||
for filename in os.listdir(controller_dir):
|
for filename in os.listdir(controller_dir):
|
||||||
if filename.endswith(u'api.py') and \
|
if filename.endswith(u'player.py') and \
|
||||||
not filename == 'media_api.py':
|
not filename == 'media_player.py':
|
||||||
path = os.path.join(controller_dir, filename)
|
path = os.path.join(controller_dir, filename)
|
||||||
if os.path.isfile(path):
|
if os.path.isfile(path):
|
||||||
modulename = u'openlp.core.ui.media.' + \
|
modulename = u'openlp.core.ui.media.' + \
|
||||||
@ -111,21 +112,21 @@ class MediaController(object):
|
|||||||
except ImportError:
|
except ImportError:
|
||||||
log.warn(u'Failed to import %s on path %s',
|
log.warn(u'Failed to import %s on path %s',
|
||||||
modulename, path)
|
modulename, path)
|
||||||
controller_classes = MediaAPI.__subclasses__()
|
controller_classes = MediaPlayer.__subclasses__()
|
||||||
for controller_class in controller_classes:
|
for controller_class in controller_classes:
|
||||||
controller = controller_class(self)
|
controller = controller_class(self)
|
||||||
self.register_controllers(controller)
|
self.register_controllers(controller)
|
||||||
if self.mediaApis:
|
if self.mediaPlayers:
|
||||||
apiSettings = str(QtCore.QSettings().value(u'media/apis',
|
playerSettings = str(QtCore.QSettings().value(u'media/players',
|
||||||
QtCore.QVariant(u'webkit')).toString())
|
QtCore.QVariant(u'webkit')).toString())
|
||||||
savedAPIs = apiSettings.split(u',')
|
savedPlayers = playerSettings.split(u',')
|
||||||
invalidMediaAPIs = [mediaApi for mediaApi in savedAPIs \
|
invalidMediaPlayers = [mediaPlayer for mediaPlayer in savedPlayers \
|
||||||
if not mediaApi in self.mediaApis]
|
if not mediaPlayer in self.mediaPlayers]
|
||||||
if len(invalidMediaAPIs)>0:
|
if len(invalidMediaPlayers)>0:
|
||||||
[savedAPIs.remove(invalidApi) for invalidApi in invalidMediaAPIs]
|
[savedPlayers.remove(invalidPlayer) for invalidPlayer in invalidMediaPlayers]
|
||||||
newApiSetting = u','.join(savedAPIs)
|
newPlayerSetting = u','.join(savedPlayers)
|
||||||
QtCore.QSettings().setValue(u'media/apis',
|
QtCore.QSettings().setValue(u'media/players',
|
||||||
QtCore.QVariant(newApiSetting))
|
QtCore.QVariant(newPlayerSetting))
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
return False
|
return False
|
||||||
@ -135,13 +136,13 @@ class MediaController(object):
|
|||||||
Check if there is a running media Player and do updating stuff (e.g.
|
Check if there is a running media Player and do updating stuff (e.g.
|
||||||
update the UI)
|
update the UI)
|
||||||
"""
|
"""
|
||||||
if len(self.curDisplayMediaAPI.keys()) == 0:
|
if len(self.curDisplayMediaPlayer.keys()) == 0:
|
||||||
self.timer.stop()
|
self.timer.stop()
|
||||||
else:
|
else:
|
||||||
for display in self.curDisplayMediaAPI.keys():
|
for display in self.curDisplayMediaPlayer.keys():
|
||||||
self.curDisplayMediaAPI[display].resize(display)
|
self.curDisplayMediaPlayer[display].resize(display)
|
||||||
self.curDisplayMediaAPI[display].update_ui(display)
|
self.curDisplayMediaPlayer[display].update_ui(display)
|
||||||
if self.curDisplayMediaAPI[display] \
|
if self.curDisplayMediaPlayer[display] \
|
||||||
.state == MediaState.Playing:
|
.state == MediaState.Playing:
|
||||||
return
|
return
|
||||||
self.timer.stop()
|
self.timer.stop()
|
||||||
@ -151,8 +152,8 @@ class MediaController(object):
|
|||||||
Add css style sheets to htmlbuilder
|
Add css style sheets to htmlbuilder
|
||||||
"""
|
"""
|
||||||
css = u''
|
css = u''
|
||||||
for api in self.mediaApis.values():
|
for player in self.mediaPlayers.values():
|
||||||
css += api.get_media_display_css()
|
css += player.get_media_display_css()
|
||||||
return css
|
return css
|
||||||
|
|
||||||
def get_media_display_javascript(self):
|
def get_media_display_javascript(self):
|
||||||
@ -160,8 +161,8 @@ class MediaController(object):
|
|||||||
Add javascript functions to htmlbuilder
|
Add javascript functions to htmlbuilder
|
||||||
"""
|
"""
|
||||||
js = u''
|
js = u''
|
||||||
for api in self.mediaApis.values():
|
for player in self.mediaPlayers.values():
|
||||||
js += api.get_media_display_javascript()
|
js += player.get_media_display_javascript()
|
||||||
return js
|
return js
|
||||||
|
|
||||||
def get_media_display_html(self):
|
def get_media_display_html(self):
|
||||||
@ -169,8 +170,8 @@ class MediaController(object):
|
|||||||
Add html code to htmlbuilder
|
Add html code to htmlbuilder
|
||||||
"""
|
"""
|
||||||
html = u''
|
html = u''
|
||||||
for api in self.mediaApis.values():
|
for player in self.mediaPlayers.values():
|
||||||
html += api.get_media_display_html()
|
html += player.get_media_display_html()
|
||||||
return html
|
return html
|
||||||
|
|
||||||
def add_controller_items(self, controller, control_panel):
|
def add_controller_items(self, controller, control_panel):
|
||||||
@ -248,8 +249,8 @@ class MediaController(object):
|
|||||||
if display == self.parent.previewController.previewDisplay or \
|
if display == self.parent.previewController.previewDisplay or \
|
||||||
display == self.parent.liveController.previewDisplay:
|
display == self.parent.liveController.previewDisplay:
|
||||||
display.hasAudio = False
|
display.hasAudio = False
|
||||||
for api in self.mediaApis.values():
|
for player in self.mediaPlayers.values():
|
||||||
api.setup(display)
|
player.setup(display)
|
||||||
|
|
||||||
def set_controls_visible(self, controller, value):
|
def set_controls_visible(self, controller, value):
|
||||||
# Generic controls
|
# Generic controls
|
||||||
@ -258,12 +259,12 @@ class MediaController(object):
|
|||||||
# (e.g. for DVD control, ...)
|
# (e.g. for DVD control, ...)
|
||||||
# TODO
|
# TODO
|
||||||
|
|
||||||
def resize(self, controller, display, api):
|
def resize(self, controller, display, player):
|
||||||
"""
|
"""
|
||||||
After Mainwindow changes or Splitter moved all related media widgets
|
After Mainwindow changes or Splitter moved all related media widgets
|
||||||
have to be resized
|
have to be resized
|
||||||
"""
|
"""
|
||||||
api.resize(display)
|
player.resize(display)
|
||||||
|
|
||||||
def video(self, controller, file, muted, isBackground):
|
def video(self, controller, file, muted, isBackground):
|
||||||
"""
|
"""
|
||||||
@ -316,7 +317,7 @@ class MediaController(object):
|
|||||||
display.frame.evaluateJavaScript(u'show_video( \
|
display.frame.evaluateJavaScript(u'show_video( \
|
||||||
"setBackBoard", null, null, null,"visible");')
|
"setBackBoard", null, null, null,"visible");')
|
||||||
self.set_controls_visible(controller, True)
|
self.set_controls_visible(controller, True)
|
||||||
log.debug(u'use %s controller' % self.curDisplayMediaAPI[display])
|
log.debug(u'use %s controller' % self.curDisplayMediaPlayer[display])
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
critical_error_message_box(
|
critical_error_message_box(
|
||||||
@ -327,42 +328,42 @@ class MediaController(object):
|
|||||||
|
|
||||||
def check_file_type(self, controller, display):
|
def check_file_type(self, controller, display):
|
||||||
"""
|
"""
|
||||||
Used to choose the right media API type from the prioritized API list
|
Used to choose the right media Player type from the prioritized Player list
|
||||||
"""
|
"""
|
||||||
apiSettings = str(QtCore.QSettings().value(u'media/apis',
|
playerSettings = str(QtCore.QSettings().value(u'media/players',
|
||||||
QtCore.QVariant(u'webkit')).toString())
|
QtCore.QVariant(u'webkit')).toString())
|
||||||
usedAPIs = apiSettings.split(u',')
|
usedPlayers = playerSettings.split(u',')
|
||||||
if QtCore.QSettings().value(u'media/override api',
|
if QtCore.QSettings().value(u'media/override player',
|
||||||
QtCore.QVariant(QtCore.Qt.Unchecked)) == QtCore.Qt.Checked:
|
QtCore.QVariant(QtCore.Qt.Unchecked)) == QtCore.Qt.Checked:
|
||||||
if self.overridenApi != '':
|
if self.overridenPlayer != '':
|
||||||
usedAPIs = [self.overridenApi]
|
usedPlayers = [self.overridenPlayer]
|
||||||
if controller.media_info.file_info.isFile():
|
if controller.media_info.file_info.isFile():
|
||||||
suffix = u'*.%s' % controller.media_info.file_info.suffix().toLower()
|
suffix = u'*.%s' % controller.media_info.file_info.suffix().toLower()
|
||||||
for title in usedAPIs:
|
for title in usedPlayers:
|
||||||
api = self.mediaApis[title]
|
player = self.mediaPlayers[title]
|
||||||
if suffix in api.video_extensions_list:
|
if suffix in player.video_extensions_list:
|
||||||
if not controller.media_info.is_background or \
|
if not controller.media_info.is_background or \
|
||||||
controller.media_info.is_background and api.canBackground:
|
controller.media_info.is_background and player.canBackground:
|
||||||
self.resize(controller, display, api)
|
self.resize(controller, display, player)
|
||||||
if api.load(display):
|
if player.load(display):
|
||||||
self.curDisplayMediaAPI[display] = api
|
self.curDisplayMediaPlayer[display] = player
|
||||||
controller.media_info.media_type = MediaType.Video
|
controller.media_info.media_type = MediaType.Video
|
||||||
return True
|
return True
|
||||||
if suffix in api.audio_extensions_list:
|
if suffix in player.audio_extensions_list:
|
||||||
if api.load(display):
|
if player.load(display):
|
||||||
self.curDisplayMediaAPI[display] = api
|
self.curDisplayMediaPlayer[display] = player
|
||||||
controller.media_info.media_type = MediaType.Audio
|
controller.media_info.media_type = MediaType.Audio
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
for title in usedAPIs:
|
for title in usedPlayers:
|
||||||
api = self.mediaApis[title]
|
player = self.mediaPlayers[title]
|
||||||
if api.canFolder:
|
if player.canFolder:
|
||||||
self.resize(controller, display, api)
|
self.resize(controller, display, player)
|
||||||
if api.load(display):
|
if player.load(display):
|
||||||
self.curDisplayMediaAPI[display] = api
|
self.curDisplayMediaPlayer[display] = player
|
||||||
controller.media_info.media_type = MediaType.Video
|
controller.media_info.media_type = MediaType.Video
|
||||||
return True
|
return True
|
||||||
# no valid api found
|
# no valid player found
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def video_play(self, msg, status=True):
|
def video_play(self, msg, status=True):
|
||||||
@ -371,16 +372,16 @@ class MediaController(object):
|
|||||||
"""
|
"""
|
||||||
log.debug(u'video_play')
|
log.debug(u'video_play')
|
||||||
controller = msg[0]
|
controller = msg[0]
|
||||||
for display in self.curDisplayMediaAPI.keys():
|
for display in self.curDisplayMediaPlayer.keys():
|
||||||
if display.controller == controller:
|
if display.controller == controller:
|
||||||
if controller.isLive:
|
if controller.isLive:
|
||||||
if controller.hideMenu.defaultAction().isChecked():
|
if controller.hideMenu.defaultAction().isChecked():
|
||||||
controller.hideMenu.defaultAction().trigger()
|
controller.hideMenu.defaultAction().trigger()
|
||||||
if not self.curDisplayMediaAPI[display].play(display):
|
if not self.curDisplayMediaPlayer[display].play(display):
|
||||||
return False
|
return False
|
||||||
if status:
|
if status:
|
||||||
display.frame.evaluateJavaScript(u'show_blank("desktop");')
|
display.frame.evaluateJavaScript(u'show_blank("desktop");')
|
||||||
self.curDisplayMediaAPI[display].set_visible(display, True)
|
self.curDisplayMediaPlayer[display].set_visible(display, True)
|
||||||
# Start Timer for ui updates
|
# Start Timer for ui updates
|
||||||
if not self.timer.isActive():
|
if not self.timer.isActive():
|
||||||
self.timer.start()
|
self.timer.start()
|
||||||
@ -392,9 +393,9 @@ class MediaController(object):
|
|||||||
"""
|
"""
|
||||||
log.debug(u'video_pause')
|
log.debug(u'video_pause')
|
||||||
controller = msg[0]
|
controller = msg[0]
|
||||||
for display in self.curDisplayMediaAPI.keys():
|
for display in self.curDisplayMediaPlayer.keys():
|
||||||
if display.controller == controller:
|
if display.controller == controller:
|
||||||
self.curDisplayMediaAPI[display].pause(display)
|
self.curDisplayMediaPlayer[display].pause(display)
|
||||||
|
|
||||||
def video_stop(self, msg):
|
def video_stop(self, msg):
|
||||||
"""
|
"""
|
||||||
@ -402,11 +403,11 @@ class MediaController(object):
|
|||||||
"""
|
"""
|
||||||
log.debug(u'video_stop')
|
log.debug(u'video_stop')
|
||||||
controller = msg[0]
|
controller = msg[0]
|
||||||
for display in self.curDisplayMediaAPI.keys():
|
for display in self.curDisplayMediaPlayer.keys():
|
||||||
if display.controller == controller:
|
if display.controller == controller:
|
||||||
display.frame.evaluateJavaScript(u'show_blank("black");')
|
display.frame.evaluateJavaScript(u'show_blank("black");')
|
||||||
self.curDisplayMediaAPI[display].stop(display)
|
self.curDisplayMediaPlayer[display].stop(display)
|
||||||
self.curDisplayMediaAPI[display].set_visible(display, False)
|
self.curDisplayMediaPlayer[display].set_visible(display, False)
|
||||||
|
|
||||||
def video_volume(self, msg):
|
def video_volume(self, msg):
|
||||||
"""
|
"""
|
||||||
@ -415,9 +416,9 @@ class MediaController(object):
|
|||||||
controller = msg[0]
|
controller = msg[0]
|
||||||
vol = msg[1][0]
|
vol = msg[1][0]
|
||||||
log.debug(u'video_volume %d' % vol)
|
log.debug(u'video_volume %d' % vol)
|
||||||
for display in self.curDisplayMediaAPI.keys():
|
for display in self.curDisplayMediaPlayer.keys():
|
||||||
if display.controller == controller:
|
if display.controller == controller:
|
||||||
self.curDisplayMediaAPI[display].volume(display, vol)
|
self.curDisplayMediaPlayer[display].volume(display, vol)
|
||||||
|
|
||||||
def video_seek(self, msg):
|
def video_seek(self, msg):
|
||||||
"""
|
"""
|
||||||
@ -426,23 +427,23 @@ class MediaController(object):
|
|||||||
log.debug(u'video_seek')
|
log.debug(u'video_seek')
|
||||||
controller = msg[0]
|
controller = msg[0]
|
||||||
seekVal = msg[1][0]
|
seekVal = msg[1][0]
|
||||||
for display in self.curDisplayMediaAPI.keys():
|
for display in self.curDisplayMediaPlayer.keys():
|
||||||
if display.controller == controller:
|
if display.controller == controller:
|
||||||
self.curDisplayMediaAPI[display].seek(display, seekVal)
|
self.curDisplayMediaPlayer[display].seek(display, seekVal)
|
||||||
|
|
||||||
def video_reset(self, controller):
|
def video_reset(self, controller):
|
||||||
"""
|
"""
|
||||||
Responds to the request to reset a loaded video
|
Responds to the request to reset a loaded video
|
||||||
"""
|
"""
|
||||||
log.debug(u'video_reset')
|
log.debug(u'video_reset')
|
||||||
for display in self.curDisplayMediaAPI.keys():
|
for display in self.curDisplayMediaPlayer.keys():
|
||||||
if display.controller == controller:
|
if display.controller == controller:
|
||||||
display.override = {}
|
display.override = {}
|
||||||
self.curDisplayMediaAPI[display].reset(display)
|
self.curDisplayMediaPlayer[display].reset(display)
|
||||||
self.curDisplayMediaAPI[display].set_visible(display, False)
|
self.curDisplayMediaPlayer[display].set_visible(display, False)
|
||||||
display.frame.evaluateJavaScript(u'show_video( \
|
display.frame.evaluateJavaScript(u'show_video( \
|
||||||
"setBackBoard", null, null, null,"hidden");')
|
"setBackBoard", null, null, null,"hidden");')
|
||||||
del self.curDisplayMediaAPI[display]
|
del self.curDisplayMediaPlayer[display]
|
||||||
self.set_controls_visible(controller, False)
|
self.set_controls_visible(controller, False)
|
||||||
|
|
||||||
def video_hide(self, msg):
|
def video_hide(self, msg):
|
||||||
@ -452,12 +453,12 @@ class MediaController(object):
|
|||||||
isLive = msg[1]
|
isLive = msg[1]
|
||||||
if isLive:
|
if isLive:
|
||||||
controller = self.parent.liveController
|
controller = self.parent.liveController
|
||||||
for display in self.curDisplayMediaAPI.keys():
|
for display in self.curDisplayMediaPlayer.keys():
|
||||||
if display.controller == controller:
|
if display.controller == controller:
|
||||||
if self.curDisplayMediaAPI[display] \
|
if self.curDisplayMediaPlayer[display] \
|
||||||
.state == MediaState.Playing:
|
.state == MediaState.Playing:
|
||||||
self.curDisplayMediaAPI[display].pause(display)
|
self.curDisplayMediaPlayer[display].pause(display)
|
||||||
self.curDisplayMediaAPI[display] \
|
self.curDisplayMediaPlayer[display] \
|
||||||
.set_visible(display, False)
|
.set_visible(display, False)
|
||||||
|
|
||||||
def video_blank(self, msg):
|
def video_blank(self, msg):
|
||||||
@ -469,12 +470,12 @@ class MediaController(object):
|
|||||||
if isLive:
|
if isLive:
|
||||||
Receiver.send_message(u'live_display_hide', hide_mode)
|
Receiver.send_message(u'live_display_hide', hide_mode)
|
||||||
controller = self.parent.liveController
|
controller = self.parent.liveController
|
||||||
for display in self.curDisplayMediaAPI.keys():
|
for display in self.curDisplayMediaPlayer.keys():
|
||||||
if display.controller == controller:
|
if display.controller == controller:
|
||||||
if self.curDisplayMediaAPI[display] \
|
if self.curDisplayMediaPlayer[display] \
|
||||||
.state == MediaState.Playing:
|
.state == MediaState.Playing:
|
||||||
self.curDisplayMediaAPI[display].pause(display)
|
self.curDisplayMediaPlayer[display].pause(display)
|
||||||
self.curDisplayMediaAPI[display] \
|
self.curDisplayMediaPlayer[display] \
|
||||||
.set_visible(display, False)
|
.set_visible(display, False)
|
||||||
|
|
||||||
def video_unblank(self, msg):
|
def video_unblank(self, msg):
|
||||||
@ -485,12 +486,12 @@ class MediaController(object):
|
|||||||
isLive = msg[1]
|
isLive = msg[1]
|
||||||
if isLive:
|
if isLive:
|
||||||
controller = self.parent.liveController
|
controller = self.parent.liveController
|
||||||
for display in self.curDisplayMediaAPI.keys():
|
for display in self.curDisplayMediaPlayer.keys():
|
||||||
if display.controller == controller:
|
if display.controller == controller:
|
||||||
if self.curDisplayMediaAPI[display] \
|
if self.curDisplayMediaPlayer[display] \
|
||||||
.state == MediaState.Paused:
|
.state == MediaState.Paused:
|
||||||
if self.curDisplayMediaAPI[display].play(display):
|
if self.curDisplayMediaPlayer[display].play(display):
|
||||||
self.curDisplayMediaAPI[display] \
|
self.curDisplayMediaPlayer[display] \
|
||||||
.set_visible(display, True)
|
.set_visible(display, True)
|
||||||
# Start Timer for ui updates
|
# Start Timer for ui updates
|
||||||
if not self.timer.isActive():
|
if not self.timer.isActive():
|
||||||
@ -499,28 +500,28 @@ class MediaController(object):
|
|||||||
|
|
||||||
def get_audio_extensions_list(self):
|
def get_audio_extensions_list(self):
|
||||||
audio_list = []
|
audio_list = []
|
||||||
for api in self.mediaApis.values():
|
for player in self.mediaPlayers.values():
|
||||||
for item in api.audio_extensions_list:
|
for item in player.audio_extensions_list:
|
||||||
if not item in audio_list:
|
if not item in audio_list:
|
||||||
audio_list.append(item)
|
audio_list.append(item)
|
||||||
return audio_list
|
return audio_list
|
||||||
|
|
||||||
def get_video_extensions_list(self):
|
def get_video_extensions_list(self):
|
||||||
video_list = []
|
video_list = []
|
||||||
for api in self.mediaApis.values():
|
for player in self.mediaPlayers.values():
|
||||||
for item in api.video_extensions_list:
|
for item in player.video_extensions_list:
|
||||||
if not item in video_list:
|
if not item in video_list:
|
||||||
video_list.append(item)
|
video_list.append(item)
|
||||||
return video_list
|
return video_list
|
||||||
|
|
||||||
def override_api(self, override_api):
|
def override_player(self, override_player):
|
||||||
apiSettings = str(QtCore.QSettings().value(u'media/apis',
|
playerSettings = str(QtCore.QSettings().value(u'media/players',
|
||||||
QtCore.QVariant(u'webkit')).toString())
|
QtCore.QVariant(u'webkit')).toString())
|
||||||
usedAPIs = apiSettings.split(u',')
|
usedPlayers = playerSettings.split(u',')
|
||||||
if override_api in usedAPIs:
|
if override_player in usedPlayers:
|
||||||
self.overridenApi = override_api
|
self.overridenPlayer = override_player
|
||||||
else:
|
else:
|
||||||
self.overridenApi = ''
|
self.overridenPlayer = ''
|
||||||
|
|
||||||
def finalise(self):
|
def finalise(self):
|
||||||
self.timer.stop()
|
self.timer.stop()
|
||||||
|
@ -33,7 +33,8 @@ from PyQt4 import QtCore, QtGui
|
|||||||
from PyQt4.phonon import Phonon
|
from PyQt4.phonon import Phonon
|
||||||
|
|
||||||
from openlp.core.lib import Receiver
|
from openlp.core.lib import Receiver
|
||||||
from openlp.core.ui.media import MediaAPI, MediaState
|
from openlp.core.lib.media_player import MediaPlayer
|
||||||
|
from openlp.core.ui.media import MediaState
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
@ -54,14 +55,14 @@ ADDITIONAL_EXT = {
|
|||||||
u'video/x-ms-wmv': [u'.wmv']}
|
u'video/x-ms-wmv': [u'.wmv']}
|
||||||
|
|
||||||
|
|
||||||
class PhononAPI(MediaAPI):
|
class PhononPlayer(MediaPlayer):
|
||||||
"""
|
"""
|
||||||
A specialised version of the MediaAPI class, which provides a Phonon
|
A specialised version of the MediaPlayer class, which provides a Phonon
|
||||||
display.
|
display.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, parent):
|
def __init__(self, parent):
|
||||||
MediaAPI.__init__(self, parent, u'phonon')
|
MediaPlayer.__init__(self, parent, u'phonon')
|
||||||
self.parent = parent
|
self.parent = parent
|
||||||
self.additional_extensions = ADDITIONAL_EXT
|
self.additional_extensions = ADDITIONAL_EXT
|
||||||
mimetypes.init()
|
mimetypes.init()
|
@ -37,7 +37,8 @@ except:
|
|||||||
|
|
||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
from openlp.core.lib import Receiver
|
from openlp.core.lib import Receiver
|
||||||
from openlp.core.ui.media import MediaAPI, MediaState
|
from openlp.core.lib.media_player import MediaPlayer
|
||||||
|
from openlp.core.ui.media import MediaState
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
@ -73,14 +74,14 @@ VIDEO_EXT = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
class VlcAPI(MediaAPI):
|
class VlcPlayer(MediaPlayer):
|
||||||
"""
|
"""
|
||||||
A specialised version of the MediaAPI class, which provides a QtWebKit
|
A specialised version of the MediaPlayer class, which provides a QtWebKit
|
||||||
display.
|
display.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, parent):
|
def __init__(self, parent):
|
||||||
MediaAPI.__init__(self, parent, u'vlc')
|
MediaPlayer.__init__(self, parent, u'vlc')
|
||||||
self.parent = parent
|
self.parent = parent
|
||||||
self.canFolder = True
|
self.canFolder = True
|
||||||
self.audio_extensions_list = AUDIO_EXT
|
self.audio_extensions_list = AUDIO_EXT
|
@ -30,7 +30,8 @@ import logging
|
|||||||
from PyQt4 import QtCore, QtGui, QtWebKit
|
from PyQt4 import QtCore, QtGui, QtWebKit
|
||||||
|
|
||||||
from openlp.core.lib import OpenLPToolbar, translate
|
from openlp.core.lib import OpenLPToolbar, translate
|
||||||
from openlp.core.ui.media import MediaAPI, MediaState
|
from openlp.core.lib.media_player import MediaPlayer
|
||||||
|
from openlp.core.ui.media import MediaState
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
@ -254,14 +255,14 @@ AUDIO_EXT = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
class WebkitAPI(MediaAPI):
|
class WebkitPlayer(MediaPlayer):
|
||||||
"""
|
"""
|
||||||
A specialised version of the MediaAPI class, which provides a QtWebKit
|
A specialised version of the MediaPlayer class, which provides a QtWebKit
|
||||||
display.
|
display.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, parent):
|
def __init__(self, parent):
|
||||||
MediaAPI.__init__(self, parent, u'webkit')
|
MediaPlayer.__init__(self, parent, u'webkit')
|
||||||
self.parent = parent
|
self.parent = parent
|
||||||
self.canBackground = True
|
self.canBackground = True
|
||||||
self.audio_extensions_list = AUDIO_EXT
|
self.audio_extensions_list = AUDIO_EXT
|
||||||
@ -403,12 +404,10 @@ class WebkitAPI(MediaAPI):
|
|||||||
(currentTime, ok) = display.frame.evaluateJavaScript( \
|
(currentTime, ok) = display.frame.evaluateJavaScript( \
|
||||||
u'show_video("currentTime");').toFloat()
|
u'show_video("currentTime");').toFloat()
|
||||||
# check if conversion was ok and value is not 'NaN'
|
# check if conversion was ok and value is not 'NaN'
|
||||||
print currentTime,
|
|
||||||
if ok and currentTime != float('inf'):
|
if ok and currentTime != float('inf'):
|
||||||
currentTime = int(currentTime*1000)
|
currentTime = int(currentTime*1000)
|
||||||
(length, ok) = display.frame.evaluateJavaScript( \
|
(length, ok) = display.frame.evaluateJavaScript( \
|
||||||
u'show_video("length");').toFloat()
|
u'show_video("length");').toFloat()
|
||||||
print length
|
|
||||||
# check if conversion was ok and value is not 'NaN'
|
# check if conversion was ok and value is not 'NaN'
|
||||||
if ok and length != float('inf'):
|
if ok and length != float('inf'):
|
||||||
length = int(length*1000)
|
length = int(length*1000)
|
@ -34,7 +34,7 @@ from PyQt4 import QtCore, QtGui
|
|||||||
from PyQt4.phonon import Phonon
|
from PyQt4.phonon import Phonon
|
||||||
|
|
||||||
from openlp.core.lib import OpenLPToolbar, Receiver, ItemCapabilities, \
|
from openlp.core.lib import OpenLPToolbar, Receiver, ItemCapabilities, \
|
||||||
translate, build_icon, ServiceItem, build_html
|
translate, build_icon, ServiceItem, build_html, PluginManager, ServiceItem
|
||||||
from openlp.core.lib.ui import UiStrings, shortcut_action
|
from openlp.core.lib.ui import UiStrings, shortcut_action
|
||||||
from openlp.core.ui import HideMode, MainDisplay, Display, ScreenList
|
from openlp.core.ui import HideMode, MainDisplay, Display, ScreenList
|
||||||
from openlp.core.utils.actions import ActionList, CategoryOrder
|
from openlp.core.utils.actions import ActionList, CategoryOrder
|
||||||
@ -291,7 +291,7 @@ class SlideController(Controller):
|
|||||||
self.previewDisplay.setup()
|
self.previewDisplay.setup()
|
||||||
serviceItem = ServiceItem()
|
serviceItem = ServiceItem()
|
||||||
self.previewDisplay.webView.setHtml(build_html(serviceItem,
|
self.previewDisplay.webView.setHtml(build_html(serviceItem,
|
||||||
self.previewDisplay.screen, None, self.isLive, None))
|
self.previewDisplay.screen, None, self.isLive, None, PluginManager.get_instance().plugins))
|
||||||
# self.previewDisplay.webView.hide()
|
# self.previewDisplay.webView.hide()
|
||||||
self.slideLayout.insertWidget(0, self.previewDisplay)
|
self.slideLayout.insertWidget(0, self.previewDisplay)
|
||||||
self.previewDisplay.hide()
|
self.previewDisplay.hide()
|
||||||
@ -419,6 +419,10 @@ class SlideController(Controller):
|
|||||||
self.mediaController.setup_display(self.display)
|
self.mediaController.setup_display(self.display)
|
||||||
self.previewSizeChanged()
|
self.previewSizeChanged()
|
||||||
self.previewDisplay.setup()
|
self.previewDisplay.setup()
|
||||||
|
serviceItem = ServiceItem()
|
||||||
|
self.previewDisplay.webView.setHtml(build_html(serviceItem,
|
||||||
|
self.previewDisplay.screen, None, self.isLive, None,
|
||||||
|
plugins=PluginManager.get_instance().plugins))
|
||||||
self.mediaController.setup_display(self.previewDisplay)
|
self.mediaController.setup_display(self.previewDisplay)
|
||||||
if self.serviceItem:
|
if self.serviceItem:
|
||||||
self.refreshServiceItem()
|
self.refreshServiceItem()
|
||||||
|
@ -1,28 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
|
||||||
# --------------------------------------------------------------------------- #
|
|
||||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
|
||||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
|
||||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
|
||||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
|
||||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
|
||||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
|
||||||
# --------------------------------------------------------------------------- #
|
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
|
||||||
# Software Foundation; version 2 of the License. #
|
|
||||||
# #
|
|
||||||
# This program is distributed in the hope that it will be useful, but WITHOUT #
|
|
||||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or #
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for #
|
|
||||||
# more details. #
|
|
||||||
# #
|
|
||||||
# You should have received a copy of the GNU General Public License along #
|
|
||||||
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
|
||||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
from mediaopenform import MediaOpenForm
|
|
@ -1,297 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
|
||||||
# --------------------------------------------------------------------------- #
|
|
||||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
|
||||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
|
||||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
|
||||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
|
||||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
|
||||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
|
||||||
# --------------------------------------------------------------------------- #
|
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
|
||||||
# Software Foundation; version 2 of the License. #
|
|
||||||
# #
|
|
||||||
# This program is distributed in the hope that it will be useful, but WITHOUT #
|
|
||||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or #
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for #
|
|
||||||
# more details. #
|
|
||||||
# #
|
|
||||||
# You should have received a copy of the GNU General Public License along #
|
|
||||||
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
|
||||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
from PyQt4 import QtCore, QtGui
|
|
||||||
|
|
||||||
from openlp.core.lib import translate
|
|
||||||
from openlp.core.lib.ui import UiStrings
|
|
||||||
|
|
||||||
class Ui_MediaOpenDialog(object):
|
|
||||||
def setupUi(self, mediaOpenDialog):
|
|
||||||
mediaOpenDialog.setObjectName(u'mediaOpenDialog')
|
|
||||||
mediaOpenDialog.resize(574, 431)
|
|
||||||
self.verticalLayout = QtGui.QVBoxLayout(mediaOpenDialog)
|
|
||||||
self.verticalLayout.setObjectName(u'verticalLayout')
|
|
||||||
self.MediaOpenWidget = QtGui.QTabWidget(mediaOpenDialog)
|
|
||||||
self.MediaOpenWidget.setTabPosition(QtGui.QTabWidget.North)
|
|
||||||
self.MediaOpenWidget.setTabShape(QtGui.QTabWidget.Rounded)
|
|
||||||
self.MediaOpenWidget.setTabsClosable(False)
|
|
||||||
self.MediaOpenWidget.setObjectName(u'MediaOpenWidget')
|
|
||||||
self.FileTab = QtGui.QWidget()
|
|
||||||
self.FileTab.setObjectName(u'FileTab')
|
|
||||||
self.verticalLayout_2 = QtGui.QVBoxLayout(self.FileTab)
|
|
||||||
self.verticalLayout_2.setObjectName(u'verticalLayout_2')
|
|
||||||
self.FileSelectionGroupBox = QtGui.QGroupBox(self.FileTab)
|
|
||||||
self.FileSelectionGroupBox.setObjectName(u'FileSelectionGroupBox')
|
|
||||||
self.verticalLayout_7 = QtGui.QVBoxLayout(self.FileSelectionGroupBox)
|
|
||||||
self.verticalLayout_7.setObjectName(u'verticalLayout_7')
|
|
||||||
self.ChooseFilesLabel = QtGui.QLabel(self.FileSelectionGroupBox)
|
|
||||||
self.ChooseFilesLabel.setObjectName(u'ChooseFilesLabel')
|
|
||||||
self.verticalLayout_7.addWidget(self.ChooseFilesLabel)
|
|
||||||
self.horizontalLayout = QtGui.QHBoxLayout()
|
|
||||||
self.horizontalLayout.setObjectName(u'horizontalLayout')
|
|
||||||
self.FilesListView = QtGui.QListWidget(self.FileSelectionGroupBox)
|
|
||||||
self.FilesListView.setObjectName(u'FilesListView')
|
|
||||||
self.horizontalLayout.addWidget(self.FilesListView)
|
|
||||||
self.AddRemovelLayout = QtGui.QVBoxLayout()
|
|
||||||
self.AddRemovelLayout.setObjectName(u'AddRemovelLayout')
|
|
||||||
self.FileAddButton = QtGui.QPushButton(self.FileSelectionGroupBox)
|
|
||||||
self.FileAddButton.setObjectName(u'FileAddButton')
|
|
||||||
self.AddRemovelLayout.addWidget(self.FileAddButton)
|
|
||||||
self.FileRemoveButton = QtGui.QPushButton(self.FileSelectionGroupBox)
|
|
||||||
self.FileRemoveButton.setObjectName(u'FileRemoveButton')
|
|
||||||
self.AddRemovelLayout.addWidget(self.FileRemoveButton)
|
|
||||||
spacerItem = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum,
|
|
||||||
QtGui.QSizePolicy.Expanding)
|
|
||||||
self.AddRemovelLayout.addItem(spacerItem)
|
|
||||||
self.horizontalLayout.addLayout(self.AddRemovelLayout)
|
|
||||||
self.verticalLayout_7.addLayout(self.horizontalLayout)
|
|
||||||
spacerItem1 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum,
|
|
||||||
QtGui.QSizePolicy.Expanding)
|
|
||||||
self.verticalLayout_7.addItem(spacerItem1)
|
|
||||||
self.verticalLayout_2.addWidget(self.FileSelectionGroupBox)
|
|
||||||
self.MediaOpenWidget.addTab(self.FileTab, u'')
|
|
||||||
self.MediaTab = QtGui.QWidget()
|
|
||||||
self.MediaTab.setObjectName(u'MediaTab')
|
|
||||||
self.verticalLayout_3 = QtGui.QVBoxLayout(self.MediaTab)
|
|
||||||
self.verticalLayout_3.setObjectName(u'verticalLayout_3')
|
|
||||||
self.ChooseMediaGroupBox = QtGui.QGroupBox(self.MediaTab)
|
|
||||||
self.ChooseMediaGroupBox.setObjectName(u'ChooseMediaGroupBox')
|
|
||||||
self.verticalLayout_8 = QtGui.QVBoxLayout(self.ChooseMediaGroupBox)
|
|
||||||
self.verticalLayout_8.setObjectName(u'verticalLayout_8')
|
|
||||||
self.MediaTypeWidget = QtGui.QWidget(self.ChooseMediaGroupBox)
|
|
||||||
self.MediaTypeWidget.setObjectName(u'MediaTypeWidget')
|
|
||||||
self.horizontalLayout_2 = QtGui.QHBoxLayout(self.MediaTypeWidget)
|
|
||||||
self.horizontalLayout_2.setMargin(0)
|
|
||||||
self.horizontalLayout_2.setObjectName(u'horizontalLayout_2')
|
|
||||||
self.DvdRadioButton = QtGui.QRadioButton(self.MediaTypeWidget)
|
|
||||||
self.DvdRadioButton.setObjectName(u'DvdRadioButton')
|
|
||||||
self.horizontalLayout_2.addWidget(self.DvdRadioButton)
|
|
||||||
self.AudioCdRadioButton = QtGui.QRadioButton(self.MediaTypeWidget)
|
|
||||||
self.AudioCdRadioButton.setObjectName(u'AudioCdRadioButton')
|
|
||||||
self.horizontalLayout_2.addWidget(self.AudioCdRadioButton)
|
|
||||||
self.verticalLayout_8.addWidget(self.MediaTypeWidget)
|
|
||||||
self.DeviceWidget = QtGui.QWidget(self.ChooseMediaGroupBox)
|
|
||||||
self.DeviceWidget.setObjectName(u'DeviceWidget')
|
|
||||||
self.horizontalLayout_10 = QtGui.QHBoxLayout(self.DeviceWidget)
|
|
||||||
self.horizontalLayout_10.setMargin(0)
|
|
||||||
self.horizontalLayout_10.setObjectName(u'horizontalLayout_10')
|
|
||||||
self.DeviceLabel = QtGui.QLabel(self.DeviceWidget)
|
|
||||||
self.DeviceLabel.setObjectName(u'DeviceLabel')
|
|
||||||
self.horizontalLayout_10.addWidget(self.DeviceLabel)
|
|
||||||
self.DeviceComboBox = QtGui.QComboBox(self.DeviceWidget)
|
|
||||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.MinimumExpanding,
|
|
||||||
QtGui.QSizePolicy.Fixed)
|
|
||||||
sizePolicy.setHorizontalStretch(0)
|
|
||||||
sizePolicy.setVerticalStretch(0)
|
|
||||||
sizePolicy.setHeightForWidth( \
|
|
||||||
self.DeviceComboBox.sizePolicy().hasHeightForWidth())
|
|
||||||
self.DeviceComboBox.setSizePolicy(sizePolicy)
|
|
||||||
self.DeviceComboBox.setObjectName(u'DeviceComboBox')
|
|
||||||
self.horizontalLayout_10.addWidget(self.DeviceComboBox)
|
|
||||||
self.DeviceEject = QtGui.QPushButton(self.DeviceWidget)
|
|
||||||
sizePolicy = QtGui.QSizePolicy( \
|
|
||||||
QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
|
|
||||||
sizePolicy.setHorizontalStretch(0)
|
|
||||||
sizePolicy.setVerticalStretch(0)
|
|
||||||
sizePolicy.setHeightForWidth( \
|
|
||||||
self.DeviceEject.sizePolicy().hasHeightForWidth())
|
|
||||||
self.DeviceEject.setSizePolicy(sizePolicy)
|
|
||||||
self.DeviceEject.setObjectName(u'DeviceEject')
|
|
||||||
self.horizontalLayout_10.addWidget(self.DeviceEject)
|
|
||||||
self.DeviceSearchButton = QtGui.QPushButton(self.DeviceWidget)
|
|
||||||
self.DeviceSearchButton.setObjectName(u'DeviceSearchButton')
|
|
||||||
self.horizontalLayout_10.addWidget(self.DeviceSearchButton)
|
|
||||||
self.verticalLayout_8.addWidget(self.DeviceWidget)
|
|
||||||
self.verticalLayout_3.addWidget(self.ChooseMediaGroupBox)
|
|
||||||
self.StartpositionGroupBox = QtGui.QGroupBox(self.MediaTab)
|
|
||||||
self.StartpositionGroupBox.setObjectName(u'StartpositionGroupBox')
|
|
||||||
self.horizontalLayout_4 = QtGui.QHBoxLayout(self.StartpositionGroupBox)
|
|
||||||
self.horizontalLayout_4.setObjectName(u'horizontalLayout_4')
|
|
||||||
self.TitleWidget = QtGui.QWidget(self.StartpositionGroupBox)
|
|
||||||
self.TitleWidget.setObjectName(u'TitleWidget')
|
|
||||||
self.horizontalLayout_7 = QtGui.QHBoxLayout(self.TitleWidget)
|
|
||||||
self.horizontalLayout_7.setMargin(0)
|
|
||||||
self.horizontalLayout_7.setObjectName(u'horizontalLayout_7')
|
|
||||||
self.TitleLabel = QtGui.QLabel(self.TitleWidget)
|
|
||||||
sizePolicy = QtGui.QSizePolicy( \
|
|
||||||
QtGui.QSizePolicy.MinimumExpanding, QtGui.QSizePolicy.Preferred)
|
|
||||||
sizePolicy.setHorizontalStretch(0)
|
|
||||||
sizePolicy.setVerticalStretch(0)
|
|
||||||
sizePolicy.setHeightForWidth( \
|
|
||||||
self.TitleLabel.sizePolicy().hasHeightForWidth())
|
|
||||||
self.TitleLabel.setSizePolicy(sizePolicy)
|
|
||||||
self.TitleLabel.setObjectName(u'TitleLabel')
|
|
||||||
self.horizontalLayout_7.addWidget(self.TitleLabel)
|
|
||||||
self.horizontalLayout_4.addWidget(self.TitleWidget)
|
|
||||||
self.ChapterWidget = QtGui.QWidget(self.StartpositionGroupBox)
|
|
||||||
self.ChapterWidget.setEnabled(True)
|
|
||||||
self.ChapterWidget.setObjectName(u'ChapterWidget')
|
|
||||||
self.horizontalLayout_6 = QtGui.QHBoxLayout(self.ChapterWidget)
|
|
||||||
self.horizontalLayout_6.setMargin(0)
|
|
||||||
self.horizontalLayout_6.setObjectName(u'horizontalLayout_6')
|
|
||||||
self.ChapterLabel = QtGui.QLabel(self.ChapterWidget)
|
|
||||||
sizePolicy = QtGui.QSizePolicy( \
|
|
||||||
QtGui.QSizePolicy.MinimumExpanding, QtGui.QSizePolicy.Preferred)
|
|
||||||
sizePolicy.setHorizontalStretch(0)
|
|
||||||
sizePolicy.setVerticalStretch(0)
|
|
||||||
sizePolicy.setHeightForWidth( \
|
|
||||||
self.ChapterLabel.sizePolicy().hasHeightForWidth())
|
|
||||||
self.ChapterLabel.setSizePolicy(sizePolicy)
|
|
||||||
self.ChapterLabel.setObjectName(u'ChapterLabel')
|
|
||||||
self.horizontalLayout_6.addWidget(self.ChapterLabel)
|
|
||||||
self.ChapterSpinBox = QtGui.QSpinBox(self.ChapterWidget)
|
|
||||||
self.ChapterSpinBox.setObjectName(u'ChapterSpinBox')
|
|
||||||
self.horizontalLayout_6.addWidget(self.ChapterSpinBox)
|
|
||||||
self.horizontalLayout_4.addWidget(self.ChapterWidget)
|
|
||||||
self.verticalLayout_3.addWidget(self.StartpositionGroupBox)
|
|
||||||
self.AudioSubtitleGroupBox = QtGui.QGroupBox(self.MediaTab)
|
|
||||||
self.AudioSubtitleGroupBox.setObjectName(u'AudioSubtitleGroupBox')
|
|
||||||
self.horizontalLayout_5 = QtGui.QHBoxLayout(self.AudioSubtitleGroupBox)
|
|
||||||
self.horizontalLayout_5.setObjectName(u'horizontalLayout_5')
|
|
||||||
self.AudioTrackWidget = QtGui.QWidget(self.AudioSubtitleGroupBox)
|
|
||||||
self.AudioTrackWidget.setObjectName(u'AudioTrackWidget')
|
|
||||||
self.horizontalLayout_9 = QtGui.QHBoxLayout(self.AudioTrackWidget)
|
|
||||||
self.horizontalLayout_9.setMargin(0)
|
|
||||||
self.horizontalLayout_9.setObjectName(u'horizontalLayout_9')
|
|
||||||
self.AudioTrackLabel_2 = QtGui.QLabel(self.AudioTrackWidget)
|
|
||||||
sizePolicy = QtGui.QSizePolicy( \
|
|
||||||
QtGui.QSizePolicy.MinimumExpanding, QtGui.QSizePolicy.Preferred)
|
|
||||||
sizePolicy.setHorizontalStretch(0)
|
|
||||||
sizePolicy.setVerticalStretch(0)
|
|
||||||
sizePolicy.setHeightForWidth( \
|
|
||||||
self.AudioTrackLabel_2.sizePolicy().hasHeightForWidth())
|
|
||||||
self.AudioTrackLabel_2.setSizePolicy(sizePolicy)
|
|
||||||
self.AudioTrackLabel_2.setObjectName(u'AudioTrackLabel_2')
|
|
||||||
self.horizontalLayout_9.addWidget(self.AudioTrackLabel_2)
|
|
||||||
self.TitleSpinBox = QtGui.QSpinBox(self.AudioTrackWidget)
|
|
||||||
self.TitleSpinBox.setObjectName(u'TitleSpinBox')
|
|
||||||
self.horizontalLayout_9.addWidget(self.TitleSpinBox)
|
|
||||||
self.horizontalLayout_5.addWidget(self.AudioTrackWidget)
|
|
||||||
self.SubtitleTrackWidget = QtGui.QWidget(self.AudioSubtitleGroupBox)
|
|
||||||
self.SubtitleTrackWidget.setObjectName(u'SubtitleTrackWidget')
|
|
||||||
self.horizontalLayout_8 = QtGui.QHBoxLayout(self.SubtitleTrackWidget)
|
|
||||||
self.horizontalLayout_8.setMargin(0)
|
|
||||||
self.horizontalLayout_8.setObjectName(u'horizontalLayout_8')
|
|
||||||
self.SubtitleTrackLabel = QtGui.QLabel(self.SubtitleTrackWidget)
|
|
||||||
sizePolicy = QtGui.QSizePolicy( \
|
|
||||||
QtGui.QSizePolicy.MinimumExpanding, QtGui.QSizePolicy.Preferred)
|
|
||||||
sizePolicy.setHorizontalStretch(0)
|
|
||||||
sizePolicy.setVerticalStretch(0)
|
|
||||||
sizePolicy.setHeightForWidth( \
|
|
||||||
self.SubtitleTrackLabel.sizePolicy().hasHeightForWidth())
|
|
||||||
self.SubtitleTrackLabel.setSizePolicy(sizePolicy)
|
|
||||||
self.SubtitleTrackLabel.setObjectName(u'SubtitleTrackLabel')
|
|
||||||
self.horizontalLayout_8.addWidget(self.SubtitleTrackLabel)
|
|
||||||
self.SubtitleTrackSpinBox = QtGui.QSpinBox(self.SubtitleTrackWidget)
|
|
||||||
self.SubtitleTrackSpinBox.setObjectName(u'SubtitleTrackSpinBox')
|
|
||||||
self.horizontalLayout_8.addWidget(self.SubtitleTrackSpinBox)
|
|
||||||
self.horizontalLayout_5.addWidget(self.SubtitleTrackWidget)
|
|
||||||
self.verticalLayout_3.addWidget(self.AudioSubtitleGroupBox)
|
|
||||||
spacerItem2 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, \
|
|
||||||
QtGui.QSizePolicy.Expanding)
|
|
||||||
self.verticalLayout_3.addItem(spacerItem2)
|
|
||||||
self.MediaOpenWidget.addTab(self.MediaTab, u'')
|
|
||||||
self.NetworkTab = QtGui.QWidget()
|
|
||||||
self.NetworkTab.setObjectName(u'NetworkTab')
|
|
||||||
self.verticalLayout_4 = QtGui.QVBoxLayout(self.NetworkTab)
|
|
||||||
self.verticalLayout_4.setObjectName(u'verticalLayout_4')
|
|
||||||
self.NetworkprotocolGroupBox = QtGui.QGroupBox(self.NetworkTab)
|
|
||||||
self.NetworkprotocolGroupBox.setObjectName(u'NetworkprotocolGroupBox')
|
|
||||||
self.verticalLayout_5 = QtGui.QVBoxLayout(self.NetworkprotocolGroupBox)
|
|
||||||
self.verticalLayout_5.setObjectName(u'verticalLayout_5')
|
|
||||||
self.NetworkAdressLabel = QtGui.QLabel(self.NetworkprotocolGroupBox)
|
|
||||||
self.NetworkAdressLabel.setObjectName(u'NetworkAdressLabel')
|
|
||||||
self.verticalLayout_5.addWidget(self.NetworkAdressLabel)
|
|
||||||
self.NetworkAdressEdit = QtGui.QLineEdit(self.NetworkprotocolGroupBox)
|
|
||||||
self.NetworkAdressEdit.setObjectName(u'NetworkAdressEdit')
|
|
||||||
self.verticalLayout_5.addWidget(self.NetworkAdressEdit)
|
|
||||||
spacerItem3 = QtGui.QSpacerItem(20, 259, QtGui.QSizePolicy.Minimum, \
|
|
||||||
QtGui.QSizePolicy.Expanding)
|
|
||||||
self.verticalLayout_5.addItem(spacerItem3)
|
|
||||||
self.verticalLayout_4.addWidget(self.NetworkprotocolGroupBox)
|
|
||||||
self.MediaOpenWidget.addTab(self.NetworkTab, u'')
|
|
||||||
self.verticalLayout.addWidget(self.MediaOpenWidget)
|
|
||||||
self.ButtonBox = QtGui.QDialogButtonBox(mediaOpenDialog)
|
|
||||||
self.ButtonBox.setStandardButtons( \
|
|
||||||
QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok)
|
|
||||||
self.ButtonBox.setObjectName(u'ButtonBox')
|
|
||||||
self.verticalLayout.addWidget(self.ButtonBox)
|
|
||||||
|
|
||||||
self.retranslateUi(mediaOpenDialog)
|
|
||||||
self.MediaOpenWidget.setCurrentIndex(0)
|
|
||||||
QtCore.QMetaObject.connectSlotsByName(mediaOpenDialog)
|
|
||||||
|
|
||||||
def retranslateUi(self, mediaOpenDialog):
|
|
||||||
mediaOpenDialog.setWindowTitle(
|
|
||||||
translate('MediaPlugin', 'mediaOpenForm'))
|
|
||||||
self.FileSelectionGroupBox.setTitle(translate(
|
|
||||||
'MediaPlugin', 'File Selection'))
|
|
||||||
self.ChooseFilesLabel.setText(
|
|
||||||
translate('MediaPlugin', 'Choose Files with the Buttons right.'))
|
|
||||||
self.FileAddButton.setText(
|
|
||||||
translate('MediaPlugin', 'Add ...'))
|
|
||||||
self.FileRemoveButton.setText(
|
|
||||||
translate('MediaPlugin', 'Remove'))
|
|
||||||
self.MediaOpenWidget.setTabText(
|
|
||||||
self.MediaOpenWidget.indexOf(self.FileTab),
|
|
||||||
translate('MediaPlugin', 'File(s)'))
|
|
||||||
self.ChooseMediaGroupBox.setTitle(
|
|
||||||
translate('MediaPlugin', 'Choose Media'))
|
|
||||||
self.DvdRadioButton.setText(
|
|
||||||
translate('MediaPlugin', 'DVD'))
|
|
||||||
self.AudioCdRadioButton.setText(
|
|
||||||
translate('MediaPlugin', 'Audio-CD'))
|
|
||||||
self.DeviceLabel.setText(
|
|
||||||
translate('MediaPlugin', 'Device'))
|
|
||||||
self.DeviceEject.setText(
|
|
||||||
translate('MediaPlugin', 'Eject'))
|
|
||||||
self.DeviceSearchButton.setText(
|
|
||||||
translate('MediaPlugin', 'Search ...'))
|
|
||||||
self.StartpositionGroupBox.setTitle(
|
|
||||||
translate('MediaPlugin', 'Startposition'))
|
|
||||||
self.TitleLabel.setText(
|
|
||||||
translate('MediaPlugin', 'Title'))
|
|
||||||
self.ChapterLabel.setText(
|
|
||||||
translate('MediaPlugin', 'Chapter'))
|
|
||||||
self.AudioSubtitleGroupBox.setTitle(
|
|
||||||
translate('MediaPlugin', 'Audio and Subtitle'))
|
|
||||||
self.AudioTrackLabel_2.setText(
|
|
||||||
translate('MediaPlugin', 'Audiotrack'))
|
|
||||||
self.SubtitleTrackLabel.setText(
|
|
||||||
translate('MediaPlugin', 'Subtitletrack'))
|
|
||||||
self.MediaOpenWidget.setTabText(
|
|
||||||
self.MediaOpenWidget.indexOf(self.MediaTab),
|
|
||||||
translate('MediaPlugin', 'Location'))
|
|
||||||
self.NetworkprotocolGroupBox.setTitle(
|
|
||||||
translate('MediaPlugin', 'Networkprotocol'))
|
|
||||||
self.NetworkAdressLabel.setText(
|
|
||||||
translate('MediaPlugin', 'Network adress:'))
|
|
||||||
self.MediaOpenWidget.setTabText(
|
|
||||||
self.MediaOpenWidget.indexOf(self.NetworkTab),
|
|
||||||
translate('MediaPlugin', 'Network'))
|
|
||||||
|
|
@ -1,49 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
|
|
||||||
|
|
||||||
###############################################################################
|
|
||||||
# OpenLP - Open Source Lyrics Projection #
|
|
||||||
# --------------------------------------------------------------------------- #
|
|
||||||
# Copyright (c) 2008-2011 Raoul Snyman #
|
|
||||||
# Portions copyright (c) 2008-2011 Tim Bentley, Gerald Britton, Jonathan #
|
|
||||||
# Corwin, Michael Gorven, Scott Guerrieri, Matthias Hub, Meinert Jordan, #
|
|
||||||
# Armin Köhler, Joshua Miller, Stevan Pettit, Andreas Preikschat, Mattias #
|
|
||||||
# Põldaru, Christian Richter, Philip Ridout, Simon Scudder, Jeffrey Smith, #
|
|
||||||
# Maikel Stuivenberg, Martin Thompson, Jon Tibble, Frode Woldsund #
|
|
||||||
# --------------------------------------------------------------------------- #
|
|
||||||
# This program is free software; you can redistribute it and/or modify it #
|
|
||||||
# under the terms of the GNU General Public License as published by the Free #
|
|
||||||
# Software Foundation; version 2 of the License. #
|
|
||||||
# #
|
|
||||||
# This program is distributed in the hope that it will be useful, but WITHOUT #
|
|
||||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or #
|
|
||||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for #
|
|
||||||
# more details. #
|
|
||||||
# #
|
|
||||||
# You should have received a copy of the GNU General Public License along #
|
|
||||||
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
|
|
||||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
import logging
|
|
||||||
|
|
||||||
from PyQt4 import QtCore, QtGui
|
|
||||||
|
|
||||||
from openlp.core.lib import Receiver, translate
|
|
||||||
from mediaopendialog import Ui_MediaOpenDialog
|
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
|
||||||
|
|
||||||
class MediaOpenForm(QtGui.QDialog, Ui_MediaOpenDialog):
|
|
||||||
"""
|
|
||||||
Class documentation goes here.
|
|
||||||
"""
|
|
||||||
log.info(u'Media Open Form loaded')
|
|
||||||
def __init__(self, parent):
|
|
||||||
"""
|
|
||||||
Constructor
|
|
||||||
"""
|
|
||||||
QtGui.QDialog.__init__(self, parent)
|
|
||||||
self.setupUi(self)
|
|
||||||
# Connecting signals and slots
|
|
||||||
|
|
@ -38,7 +38,6 @@ from openlp.core.lib import MediaManagerItem, build_icon, ItemCapabilities, \
|
|||||||
from openlp.core.lib.ui import UiStrings, critical_error_message_box, \
|
from openlp.core.lib.ui import UiStrings, critical_error_message_box, \
|
||||||
media_item_combo_box
|
media_item_combo_box
|
||||||
from openlp.core.ui import Controller, Display
|
from openlp.core.ui import Controller, Display
|
||||||
from openlp.plugins.media.forms import MediaOpenForm
|
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
@ -59,7 +58,6 @@ class MediaMediaItem(MediaManagerItem):
|
|||||||
self.Automatic = u''
|
self.Automatic = u''
|
||||||
MediaManagerItem.__init__(self, parent, plugin, icon)
|
MediaManagerItem.__init__(self, parent, plugin, icon)
|
||||||
self.singleServiceItem = False
|
self.singleServiceItem = False
|
||||||
self.mediaOpenForm = MediaOpenForm(self.plugin.formparent)
|
|
||||||
self.hasSearch = True
|
self.hasSearch = True
|
||||||
self.mediaObject = None
|
self.mediaObject = None
|
||||||
self.mediaController = Controller(parent)
|
self.mediaController = Controller(parent)
|
||||||
@ -105,7 +103,7 @@ class MediaMediaItem(MediaManagerItem):
|
|||||||
self.Automatic = translate('MediaPlugin.MediaItem',
|
self.Automatic = translate('MediaPlugin.MediaItem',
|
||||||
'Automatic')
|
'Automatic')
|
||||||
self.displayTypeLabel.setText(
|
self.displayTypeLabel.setText(
|
||||||
translate('MediaPlugin.MediaItem', 'Use Api:'))
|
translate('MediaPlugin.MediaItem', 'Use Player:'))
|
||||||
|
|
||||||
def requiredIcons(self):
|
def requiredIcons(self):
|
||||||
MediaManagerItem.requiredIcons(self)
|
MediaManagerItem.requiredIcons(self)
|
||||||
@ -117,11 +115,6 @@ class MediaMediaItem(MediaManagerItem):
|
|||||||
MediaManagerItem.addListViewToToolBar(self)
|
MediaManagerItem.addListViewToToolBar(self)
|
||||||
self.listView.addAction(self.replaceAction)
|
self.listView.addAction(self.replaceAction)
|
||||||
|
|
||||||
# TODO activate own media open menu
|
|
||||||
# def addStartHeaderBar(self):
|
|
||||||
# self.replaceAction = self.addToolbarButton(u'', u'',
|
|
||||||
# u':/general/general_open.png', self.onMediaOpenClick, False)
|
|
||||||
|
|
||||||
def addEndHeaderBar(self):
|
def addEndHeaderBar(self):
|
||||||
# Replace backgrounds do not work at present so remove functionality.
|
# Replace backgrounds do not work at present so remove functionality.
|
||||||
self.replaceAction = self.addToolbarButton(u'', u'',
|
self.replaceAction = self.addToolbarButton(u'', u'',
|
||||||
@ -144,16 +137,10 @@ class MediaMediaItem(MediaManagerItem):
|
|||||||
# Add the Media widget to the page layout
|
# Add the Media widget to the page layout
|
||||||
self.pageLayout.addWidget(self.mediaWidget)
|
self.pageLayout.addWidget(self.mediaWidget)
|
||||||
QtCore.QObject.connect(self.displayTypeComboBox,
|
QtCore.QObject.connect(self.displayTypeComboBox,
|
||||||
QtCore.SIGNAL(u'currentIndexChanged (int)'), self.overrideApiChanged)
|
QtCore.SIGNAL(u'currentIndexChanged (int)'), self.overridePlayerChanged)
|
||||||
|
|
||||||
def onMediaOpenClick(self):
|
def overridePlayerChanged(self, index):
|
||||||
"""
|
Receiver.send_message(u'media_override_player', \
|
||||||
Add a folder to the list widget to make it available for showing
|
|
||||||
"""
|
|
||||||
self.mediaOpenForm.exec_()
|
|
||||||
|
|
||||||
def overrideApiChanged(self, index):
|
|
||||||
Receiver.send_message(u'media_override_api', \
|
|
||||||
u'%s' % self.displayTypeComboBox.currentText())
|
u'%s' % self.displayTypeComboBox.currentText())
|
||||||
|
|
||||||
def onResetClick(self):
|
def onResetClick(self):
|
||||||
@ -244,20 +231,20 @@ class MediaMediaItem(MediaManagerItem):
|
|||||||
|
|
||||||
def populateDisplayTypes(self):
|
def populateDisplayTypes(self):
|
||||||
"""
|
"""
|
||||||
Load the combobox with the enabled media apis,
|
Load the combobox with the enabled media players,
|
||||||
allowing user to select a specific api if settings allow
|
allowing user to select a specific player if settings allow
|
||||||
"""
|
"""
|
||||||
self.displayTypeComboBox.clear()
|
self.displayTypeComboBox.clear()
|
||||||
apiSettings = str(QtCore.QSettings().value(u'media/apis',
|
playerSettings = str(QtCore.QSettings().value(u'media/players',
|
||||||
QtCore.QVariant(u'webkit')).toString())
|
QtCore.QVariant(u'webkit')).toString())
|
||||||
usedAPIs = apiSettings.split(u',')
|
usedPlayers = playerSettings.split(u',')
|
||||||
for title in usedAPIs:
|
for title in usedPlayers:
|
||||||
# load the drop down selection
|
# load the drop down selection
|
||||||
self.displayTypeComboBox.addItem(title)
|
self.displayTypeComboBox.addItem(title)
|
||||||
if self.displayTypeComboBox.count() > 1:
|
if self.displayTypeComboBox.count() > 1:
|
||||||
self.displayTypeComboBox.insertItem(0, self.Automatic)
|
self.displayTypeComboBox.insertItem(0, self.Automatic)
|
||||||
self.displayTypeComboBox.setCurrentIndex(0)
|
self.displayTypeComboBox.setCurrentIndex(0)
|
||||||
if QtCore.QSettings().value(self.settingsSection + u'/override api',
|
if QtCore.QSettings().value(self.settingsSection + u'/override player',
|
||||||
QtCore.QVariant(QtCore.Qt.Unchecked)) == QtCore.Qt.Checked:
|
QtCore.QVariant(QtCore.Qt.Unchecked)) == QtCore.Qt.Checked:
|
||||||
self.mediaWidget.show()
|
self.mediaWidget.show()
|
||||||
else:
|
else:
|
||||||
|
@ -34,48 +34,48 @@ class MediaTab(SettingsTab):
|
|||||||
"""
|
"""
|
||||||
MediaTab is the Media settings tab in the settings dialog.
|
MediaTab is the Media settings tab in the settings dialog.
|
||||||
"""
|
"""
|
||||||
def __init__(self, parent, title, visible_title, media_apis, icon_path):
|
def __init__(self, parent, title, visible_title, media_players, icon_path):
|
||||||
self.media_apis = media_apis
|
self.media_players = media_players
|
||||||
SettingsTab.__init__(self, parent, title, visible_title, icon_path)
|
SettingsTab.__init__(self, parent, title, visible_title, icon_path)
|
||||||
|
|
||||||
def setupUi(self):
|
def setupUi(self):
|
||||||
self.setObjectName(u'MediaTab')
|
self.setObjectName(u'MediaTab')
|
||||||
SettingsTab.setupUi(self)
|
SettingsTab.setupUi(self)
|
||||||
self.mediaAPIGroupBox = QtGui.QGroupBox(self.leftColumn)
|
self.mediaPlayerGroupBox = QtGui.QGroupBox(self.leftColumn)
|
||||||
self.mediaAPIGroupBox.setObjectName(u'mediaAPIGroupBox')
|
self.mediaPlayerGroupBox.setObjectName(u'mediaPlayerGroupBox')
|
||||||
self.mediaApiLayout = QtGui.QVBoxLayout(self.mediaAPIGroupBox)
|
self.mediaPlayerLayout = QtGui.QVBoxLayout(self.mediaPlayerGroupBox)
|
||||||
self.mediaApiLayout.setObjectName(u'mediaApiLayout')
|
self.mediaPlayerLayout.setObjectName(u'mediaPlayerLayout')
|
||||||
self.ApiCheckBoxes = {}
|
self.PlayerCheckBoxes = {}
|
||||||
for key in self.media_apis:
|
for key in self.media_players:
|
||||||
api = self.media_apis[key]
|
player = self.media_players[key]
|
||||||
checkbox = QtGui.QCheckBox(self.mediaAPIGroupBox)
|
checkbox = QtGui.QCheckBox(self.mediaPlayerGroupBox)
|
||||||
checkbox.setEnabled(api.available)
|
checkbox.setEnabled(player.available)
|
||||||
checkbox.setObjectName(api.name + u'CheckBox')
|
checkbox.setObjectName(player.name + u'CheckBox')
|
||||||
self.ApiCheckBoxes[api.name] = checkbox
|
self.PlayerCheckBoxes[player.name] = checkbox
|
||||||
self.mediaApiLayout.addWidget(checkbox)
|
self.mediaPlayerLayout.addWidget(checkbox)
|
||||||
self.leftLayout.addWidget(self.mediaAPIGroupBox)
|
self.leftLayout.addWidget(self.mediaPlayerGroupBox)
|
||||||
self.apiOrderGroupBox = QtGui.QGroupBox(self.leftColumn)
|
self.playerOrderGroupBox = QtGui.QGroupBox(self.leftColumn)
|
||||||
self.apiOrderGroupBox.setObjectName(u'apiOrderGroupBox')
|
self.playerOrderGroupBox.setObjectName(u'playerOrderGroupBox')
|
||||||
self.apiOrderLayout = QtGui.QVBoxLayout(self.apiOrderGroupBox)
|
self.playerOrderLayout = QtGui.QVBoxLayout(self.playerOrderGroupBox)
|
||||||
self.apiOrderLayout.setObjectName(u'apiOrderLayout')
|
self.playerOrderLayout.setObjectName(u'playerOrderLayout')
|
||||||
self.apiOrderlistWidget = QtGui.QListWidget( \
|
self.playerOrderlistWidget = QtGui.QListWidget( \
|
||||||
self.apiOrderGroupBox)
|
self.playerOrderGroupBox)
|
||||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum,
|
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum,
|
||||||
QtGui.QSizePolicy.Expanding)
|
QtGui.QSizePolicy.Expanding)
|
||||||
sizePolicy.setHorizontalStretch(0)
|
sizePolicy.setHorizontalStretch(0)
|
||||||
sizePolicy.setVerticalStretch(0)
|
sizePolicy.setVerticalStretch(0)
|
||||||
sizePolicy.setHeightForWidth(self.apiOrderlistWidget. \
|
sizePolicy.setHeightForWidth(self.playerOrderlistWidget. \
|
||||||
sizePolicy().hasHeightForWidth())
|
sizePolicy().hasHeightForWidth())
|
||||||
self.apiOrderlistWidget.setSizePolicy(sizePolicy)
|
self.playerOrderlistWidget.setSizePolicy(sizePolicy)
|
||||||
self.apiOrderlistWidget.setVerticalScrollBarPolicy( \
|
self.playerOrderlistWidget.setVerticalScrollBarPolicy( \
|
||||||
QtCore.Qt.ScrollBarAsNeeded)
|
QtCore.Qt.ScrollBarAsNeeded)
|
||||||
self.apiOrderlistWidget.setHorizontalScrollBarPolicy( \
|
self.playerOrderlistWidget.setHorizontalScrollBarPolicy( \
|
||||||
QtCore.Qt.ScrollBarAlwaysOff)
|
QtCore.Qt.ScrollBarAlwaysOff)
|
||||||
self.apiOrderlistWidget.setEditTriggers( \
|
self.playerOrderlistWidget.setEditTriggers( \
|
||||||
QtGui.QAbstractItemView.NoEditTriggers)
|
QtGui.QAbstractItemView.NoEditTriggers)
|
||||||
self.apiOrderlistWidget.setObjectName(u'apiOrderlistWidget')
|
self.playerOrderlistWidget.setObjectName(u'playerOrderlistWidget')
|
||||||
self.apiOrderLayout.addWidget(self.apiOrderlistWidget)
|
self.playerOrderLayout.addWidget(self.playerOrderlistWidget)
|
||||||
self.orderingButtonsWidget = QtGui.QWidget(self.apiOrderGroupBox)
|
self.orderingButtonsWidget = QtGui.QWidget(self.playerOrderGroupBox)
|
||||||
self.orderingButtonsWidget.setObjectName(u'orderingButtonsWidget')
|
self.orderingButtonsWidget.setObjectName(u'orderingButtonsWidget')
|
||||||
self.orderingButtonLayout = QtGui.QHBoxLayout( \
|
self.orderingButtonLayout = QtGui.QHBoxLayout( \
|
||||||
self.orderingButtonsWidget)
|
self.orderingButtonsWidget)
|
||||||
@ -83,120 +83,120 @@ class MediaTab(SettingsTab):
|
|||||||
self.orderingDownButton = QtGui.QPushButton(self.orderingButtonsWidget)
|
self.orderingDownButton = QtGui.QPushButton(self.orderingButtonsWidget)
|
||||||
self.orderingDownButton.setObjectName(u'orderingDownButton')
|
self.orderingDownButton.setObjectName(u'orderingDownButton')
|
||||||
self.orderingButtonLayout.addWidget(self.orderingDownButton)
|
self.orderingButtonLayout.addWidget(self.orderingDownButton)
|
||||||
self.orderingUpButton = QtGui.QPushButton(self.apiOrderGroupBox)
|
self.orderingUpButton = QtGui.QPushButton(self.playerOrderGroupBox)
|
||||||
self.orderingUpButton.setObjectName(u'orderingUpButton')
|
self.orderingUpButton.setObjectName(u'orderingUpButton')
|
||||||
self.orderingButtonLayout.addWidget(self.orderingUpButton)
|
self.orderingButtonLayout.addWidget(self.orderingUpButton)
|
||||||
self.apiOrderLayout.addWidget(self.orderingButtonsWidget)
|
self.playerOrderLayout.addWidget(self.orderingButtonsWidget)
|
||||||
self.leftLayout.addWidget(self.apiOrderGroupBox)
|
self.leftLayout.addWidget(self.playerOrderGroupBox)
|
||||||
self.AdvancedGroupBox = QtGui.QGroupBox(self.leftColumn)
|
self.AdvancedGroupBox = QtGui.QGroupBox(self.leftColumn)
|
||||||
self.AdvancedGroupBox.setObjectName(u'AdvancedGroupBox')
|
self.AdvancedGroupBox.setObjectName(u'AdvancedGroupBox')
|
||||||
self.AdvancedLayout = QtGui.QVBoxLayout(self.AdvancedGroupBox)
|
self.AdvancedLayout = QtGui.QVBoxLayout(self.AdvancedGroupBox)
|
||||||
self.AdvancedLayout.setObjectName(u'AdvancedLayout')
|
self.AdvancedLayout.setObjectName(u'AdvancedLayout')
|
||||||
self.OverrideApiCheckBox = QtGui.QCheckBox(self.AdvancedGroupBox)
|
self.OverridePlayerCheckBox = QtGui.QCheckBox(self.AdvancedGroupBox)
|
||||||
self.OverrideApiCheckBox.setObjectName(u'OverrideApiCheckBox')
|
self.OverridePlayerCheckBox.setObjectName(u'OverridePlayerCheckBox')
|
||||||
self.AdvancedLayout.addWidget(self.OverrideApiCheckBox)
|
self.AdvancedLayout.addWidget(self.OverridePlayerCheckBox)
|
||||||
self.leftLayout.addWidget(self.AdvancedGroupBox)
|
self.leftLayout.addWidget(self.AdvancedGroupBox)
|
||||||
self.leftLayout.addStretch()
|
self.leftLayout.addStretch()
|
||||||
self.rightLayout.addStretch()
|
self.rightLayout.addStretch()
|
||||||
for key in self.media_apis:
|
for key in self.media_players:
|
||||||
api = self.media_apis[key]
|
player = self.media_players[key]
|
||||||
checkbox = self.ApiCheckBoxes[api.name]
|
checkbox = self.PlayerCheckBoxes[player.name]
|
||||||
QtCore.QObject.connect(checkbox,
|
QtCore.QObject.connect(checkbox,
|
||||||
QtCore.SIGNAL(u'stateChanged(int)'),
|
QtCore.SIGNAL(u'stateChanged(int)'),
|
||||||
self.onApiCheckBoxChanged)
|
self.onPlayerCheckBoxChanged)
|
||||||
QtCore.QObject.connect(self.orderingUpButton,
|
QtCore.QObject.connect(self.orderingUpButton,
|
||||||
QtCore.SIGNAL(u'pressed()'), self.onOrderingUpButtonPressed)
|
QtCore.SIGNAL(u'pressed()'), self.onOrderingUpButtonPressed)
|
||||||
QtCore.QObject.connect(self.orderingDownButton,
|
QtCore.QObject.connect(self.orderingDownButton,
|
||||||
QtCore.SIGNAL(u'pressed()'), self.onOrderingDownButtonPressed)
|
QtCore.SIGNAL(u'pressed()'), self.onOrderingDownButtonPressed)
|
||||||
|
|
||||||
def retranslateUi(self):
|
def retranslateUi(self):
|
||||||
self.mediaAPIGroupBox.setTitle(
|
self.mediaPlayerGroupBox.setTitle(
|
||||||
translate('MediaPlugin.MediaTab', 'Available Media APIs'))
|
translate('MediaPlugin.MediaTab', 'Available Media Players'))
|
||||||
for key in self.media_apis:
|
for key in self.media_players:
|
||||||
api = self.media_apis[key]
|
player = self.media_players[key]
|
||||||
checkbox = self.ApiCheckBoxes[api.name]
|
checkbox = self.PlayerCheckBoxes[player.name]
|
||||||
if api.available:
|
if player.available:
|
||||||
checkbox.setText(api.name)
|
checkbox.setText(player.name)
|
||||||
else:
|
else:
|
||||||
checkbox.setText(
|
checkbox.setText(
|
||||||
unicode(translate('MediaPlugin.MediaTab',
|
unicode(translate('MediaPlugin.MediaTab',
|
||||||
'%s (unavailable)')) % api.name)
|
'%s (unavailable)')) % player.name)
|
||||||
self.apiOrderGroupBox.setTitle(
|
self.playerOrderGroupBox.setTitle(
|
||||||
translate('MediaPlugin.MediaTab', 'API Order'))
|
translate('MediaPlugin.MediaTab', 'Player Order'))
|
||||||
self.orderingDownButton.setText(
|
self.orderingDownButton.setText(
|
||||||
translate('MediaPlugin.MediaTab', 'Down'))
|
translate('MediaPlugin.MediaTab', 'Down'))
|
||||||
self.orderingUpButton.setText(
|
self.orderingUpButton.setText(
|
||||||
translate('MediaPlugin.MediaTab', 'Up'))
|
translate('MediaPlugin.MediaTab', 'Up'))
|
||||||
self.AdvancedGroupBox.setTitle(UiStrings().Advanced)
|
self.AdvancedGroupBox.setTitle(UiStrings().Advanced)
|
||||||
self.OverrideApiCheckBox.setText(
|
self.OverridePlayerCheckBox.setText(
|
||||||
translate('MediaPlugin.MediaTab',
|
translate('MediaPlugin.MediaTab',
|
||||||
'Allow media api to be overriden'))
|
'Allow media player to be overriden'))
|
||||||
|
|
||||||
def onApiCheckBoxChanged(self, check_state):
|
def onPlayerCheckBoxChanged(self, check_state):
|
||||||
api = self.sender().text()
|
player = self.sender().text()
|
||||||
if check_state == QtCore.Qt.Checked:
|
if check_state == QtCore.Qt.Checked:
|
||||||
if api not in self.usedAPIs:
|
if player not in self.usedPlayers:
|
||||||
self.usedAPIs.append(api)
|
self.usedPlayers.append(player)
|
||||||
else:
|
else:
|
||||||
self.usedAPIs.takeAt(self.usedAPIs.indexOf(api))
|
self.usedPlayers.takeAt(self.usedPlayers.indexOf(player))
|
||||||
self.updateApiList()
|
self.updatePlayerList()
|
||||||
|
|
||||||
def updateApiList(self):
|
def updatePlayerList(self):
|
||||||
self.apiOrderlistWidget.clear()
|
self.playerOrderlistWidget.clear()
|
||||||
for api in self.usedAPIs:
|
for player in self.usedPlayers:
|
||||||
if api in self.ApiCheckBoxes.keys():
|
if player in self.PlayerCheckBoxes.keys():
|
||||||
self.apiOrderlistWidget.addItem(api)
|
self.playerOrderlistWidget.addItem(player)
|
||||||
|
|
||||||
def onOrderingUpButtonPressed(self):
|
def onOrderingUpButtonPressed(self):
|
||||||
currentRow = self.apiOrderlistWidget.currentRow()
|
currentRow = self.playerOrderlistWidget.currentRow()
|
||||||
if currentRow > 0:
|
if currentRow > 0:
|
||||||
item = self.apiOrderlistWidget.takeItem(currentRow)
|
item = self.playerOrderlistWidget.takeItem(currentRow)
|
||||||
self.apiOrderlistWidget.insertItem(currentRow - 1, item)
|
self.playerOrderlistWidget.insertItem(currentRow - 1, item)
|
||||||
self.apiOrderlistWidget.setCurrentRow(currentRow - 1)
|
self.playerOrderlistWidget.setCurrentRow(currentRow - 1)
|
||||||
self.usedAPIs.move(currentRow, currentRow - 1)
|
self.usedPlayers.move(currentRow, currentRow - 1)
|
||||||
|
|
||||||
def onOrderingDownButtonPressed(self):
|
def onOrderingDownButtonPressed(self):
|
||||||
currentRow = self.apiOrderlistWidget.currentRow()
|
currentRow = self.playerOrderlistWidget.currentRow()
|
||||||
if currentRow < self.apiOrderlistWidget.count() - 1:
|
if currentRow < self.playerOrderlistWidget.count() - 1:
|
||||||
item = self.apiOrderlistWidget.takeItem(currentRow)
|
item = self.playerOrderlistWidget.takeItem(currentRow)
|
||||||
self.apiOrderlistWidget.insertItem(currentRow + 1, item)
|
self.playerOrderlistWidget.insertItem(currentRow + 1, item)
|
||||||
self.apiOrderlistWidget.setCurrentRow(currentRow + 1)
|
self.playerOrderlistWidget.setCurrentRow(currentRow + 1)
|
||||||
self.usedAPIs.move(currentRow, currentRow + 1)
|
self.usedPlayers.move(currentRow, currentRow + 1)
|
||||||
|
|
||||||
def load(self):
|
def load(self):
|
||||||
self.usedAPIs = QtCore.QSettings().value(
|
self.usedPlayers = QtCore.QSettings().value(
|
||||||
self.settingsSection + u'/apis',
|
self.settingsSection + u'/players',
|
||||||
QtCore.QVariant(u'webkit')).toString().split(u',')
|
QtCore.QVariant(u'webkit')).toString().split(u',')
|
||||||
for key in self.media_apis:
|
for key in self.media_players:
|
||||||
api = self.media_apis[key]
|
player = self.media_players[key]
|
||||||
checkbox = self.ApiCheckBoxes[api.name]
|
checkbox = self.PlayerCheckBoxes[player.name]
|
||||||
if api.available and api.name in self.usedAPIs:
|
if player.available and player.name in self.usedPlayers:
|
||||||
checkbox.setChecked(True)
|
checkbox.setChecked(True)
|
||||||
self.updateApiList()
|
self.updatePlayerList()
|
||||||
self.OverrideApiCheckBox.setChecked(QtCore.QSettings().value(
|
self.OverridePlayerCheckBox.setChecked(QtCore.QSettings().value(
|
||||||
self.settingsSection + u'/override api',
|
self.settingsSection + u'/override player',
|
||||||
QtCore.QVariant(QtCore.Qt.Unchecked)).toInt()[0])
|
QtCore.QVariant(QtCore.Qt.Unchecked)).toInt()[0])
|
||||||
|
|
||||||
def save(self):
|
def save(self):
|
||||||
override_changed = False
|
override_changed = False
|
||||||
api_string_changed = False
|
player_string_changed = False
|
||||||
oldApiString = QtCore.QSettings().value(
|
oldPlayerString = QtCore.QSettings().value(
|
||||||
self.settingsSection + u'/apis',
|
self.settingsSection + u'/players',
|
||||||
QtCore.QVariant(u'webkit')).toString()
|
QtCore.QVariant(u'webkit')).toString()
|
||||||
newApiString = self.usedAPIs.join(u',')
|
newPlayerString = self.usedPlayers.join(u',')
|
||||||
if oldApiString != newApiString:
|
if oldPlayerString != newPlayerString:
|
||||||
# clean old Media stuff
|
# clean old Media stuff
|
||||||
QtCore.QSettings().setValue(self.settingsSection + u'/apis',
|
QtCore.QSettings().setValue(self.settingsSection + u'/players',
|
||||||
QtCore.QVariant(newApiString))
|
QtCore.QVariant(newPlayerString))
|
||||||
api_string_changed = True
|
player_string_changed = True
|
||||||
override_changed = True
|
override_changed = True
|
||||||
setting_key = self.settingsSection + u'/override api'
|
setting_key = self.settingsSection + u'/override player'
|
||||||
if QtCore.QSettings().value(setting_key) != \
|
if QtCore.QSettings().value(setting_key) != \
|
||||||
self.OverrideApiCheckBox.checkState():
|
self.OverridePlayerCheckBox.checkState():
|
||||||
QtCore.QSettings().setValue(setting_key,
|
QtCore.QSettings().setValue(setting_key,
|
||||||
QtCore.QVariant(self.OverrideApiCheckBox.checkState()))
|
QtCore.QVariant(self.OverridePlayerCheckBox.checkState()))
|
||||||
override_changed = True
|
override_changed = True
|
||||||
if override_changed:
|
if override_changed:
|
||||||
Receiver.send_message(u'mediaitem_media_rebuild')
|
Receiver.send_message(u'mediaitem_media_rebuild')
|
||||||
if api_string_changed:
|
if player_string_changed:
|
||||||
Receiver.send_message(u'config_screen_changed')
|
Receiver.send_message(u'config_screen_changed')
|
||||||
|
@ -59,7 +59,7 @@ class MediaPlugin(Plugin):
|
|||||||
"""
|
"""
|
||||||
visible_name = self.getString(StringContent.VisibleName)
|
visible_name = self.getString(StringContent.VisibleName)
|
||||||
return MediaTab(parent, self.name, visible_name[u'title'],
|
return MediaTab(parent, self.name, visible_name[u'title'],
|
||||||
self.mediaController.mediaApis, self.icon_path)
|
self.mediaController.mediaPlayers, self.icon_path)
|
||||||
|
|
||||||
def about(self):
|
def about(self):
|
||||||
about_text = translate('MediaPlugin', '<strong>Media Plugin</strong>'
|
about_text = translate('MediaPlugin', '<strong>Media Plugin</strong>'
|
||||||
|
@ -1,95 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<ui version="4.0">
|
|
||||||
<class>MediaFilesDialog</class>
|
|
||||||
<widget class="QDialog" name="MediaFilesDialog">
|
|
||||||
<property name="windowModality">
|
|
||||||
<enum>Qt::ApplicationModal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>400</width>
|
|
||||||
<height>300</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="windowTitle">
|
|
||||||
<string>Select Media File(s)</string>
|
|
||||||
</property>
|
|
||||||
<property name="modal">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<layout class="QVBoxLayout" name="filesVerticalLayout">
|
|
||||||
<property name="spacing">
|
|
||||||
<number>8</number>
|
|
||||||
</property>
|
|
||||||
<property name="margin">
|
|
||||||
<number>8</number>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QLabel" name="selectLabel">
|
|
||||||
<property name="text">
|
|
||||||
<string>Select one or more audio files from the list below, and click OK to import them into this song.</string>
|
|
||||||
</property>
|
|
||||||
<property name="wordWrap">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QListView" name="fileListView">
|
|
||||||
<property name="alternatingRowColors">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QDialogButtonBox" name="buttonBox">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="standardButtons">
|
|
||||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<resources>
|
|
||||||
<include location="../images/openlp-2.qrc"/>
|
|
||||||
</resources>
|
|
||||||
<connections>
|
|
||||||
<connection>
|
|
||||||
<sender>buttonBox</sender>
|
|
||||||
<signal>accepted()</signal>
|
|
||||||
<receiver>MediaFilesDialog</receiver>
|
|
||||||
<slot>accept()</slot>
|
|
||||||
<hints>
|
|
||||||
<hint type="sourcelabel">
|
|
||||||
<x>248</x>
|
|
||||||
<y>254</y>
|
|
||||||
</hint>
|
|
||||||
<hint type="destinationlabel">
|
|
||||||
<x>157</x>
|
|
||||||
<y>274</y>
|
|
||||||
</hint>
|
|
||||||
</hints>
|
|
||||||
</connection>
|
|
||||||
<connection>
|
|
||||||
<sender>buttonBox</sender>
|
|
||||||
<signal>rejected()</signal>
|
|
||||||
<receiver>MediaFilesDialog</receiver>
|
|
||||||
<slot>reject()</slot>
|
|
||||||
<hints>
|
|
||||||
<hint type="sourcelabel">
|
|
||||||
<x>316</x>
|
|
||||||
<y>260</y>
|
|
||||||
</hint>
|
|
||||||
<hint type="destinationlabel">
|
|
||||||
<x>286</x>
|
|
||||||
<y>274</y>
|
|
||||||
</hint>
|
|
||||||
</hints>
|
|
||||||
</connection>
|
|
||||||
</connections>
|
|
||||||
</ui>
|
|
@ -25,6 +25,5 @@
|
|||||||
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
hiddenimports = ['openlp.core.ui.media.phononapi',
|
hiddenimports = ['openlp.core.ui.media.phononplayer',
|
||||||
'openlp.core.ui.media.vlcapi',
|
'openlp.core.ui.media.webkitplayer']
|
||||||
'openlp.core.ui.media.webkitapi']
|
|
Loading…
Reference in New Issue
Block a user