forked from openlp/openlp
Renames
This commit is contained in:
parent
2dadfbd17a
commit
66728c52cd
@ -54,7 +54,7 @@ class MediaController(object):
|
|||||||
# 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.check_available_media_players()
|
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)
|
||||||
@ -80,9 +80,9 @@ class MediaController(object):
|
|||||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||||
QtCore.SIGNAL(u'songs_unblank'), self.video_unblank)
|
QtCore.SIGNAL(u'songs_unblank'), self.video_unblank)
|
||||||
QtCore.QObject.connect(Receiver.get_receiver(),
|
QtCore.QObject.connect(Receiver.get_receiver(),
|
||||||
QtCore.SIGNAL(u'mediaitem_media_rebuild'), self.set_active_players)
|
QtCore.SIGNAL(u'mediaitem_media_rebuild'), self._set_active_players)
|
||||||
|
|
||||||
def set_active_players(self):
|
def _set_active_players(self):
|
||||||
savedPlayers = get_media_players()[0]
|
savedPlayers = get_media_players()[0]
|
||||||
for player in self.mediaPlayers.keys():
|
for player in self.mediaPlayers.keys():
|
||||||
self.mediaPlayers[player].isActive = player in savedPlayers
|
self.mediaPlayers[player].isActive = player in savedPlayers
|
||||||
@ -97,12 +97,12 @@ class MediaController(object):
|
|||||||
"""
|
"""
|
||||||
self.mediaPlayers[player.name] = player
|
self.mediaPlayers[player.name] = player
|
||||||
|
|
||||||
def check_available_media_players(self):
|
def _check_available_media_players(self):
|
||||||
"""
|
"""
|
||||||
Check to see if we have any media Player's available. If Not do not
|
Check to see if we have any media Player's available. If Not do not
|
||||||
install the plugin.
|
install the plugin.
|
||||||
"""
|
"""
|
||||||
log.debug(u'check_available_media_players')
|
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')
|
||||||
@ -133,7 +133,7 @@ class MediaController(object):
|
|||||||
for invalidPlayer in invalidMediaPlayers:
|
for invalidPlayer in invalidMediaPlayers:
|
||||||
savedPlayers.remove(invalidPlayer)
|
savedPlayers.remove(invalidPlayer)
|
||||||
set_media_players(savedPlayers, overriddenPlayer)
|
set_media_players(savedPlayers, overriddenPlayer)
|
||||||
self.set_active_players()
|
self._set_active_players()
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def video_state(self):
|
def video_state(self):
|
||||||
@ -266,7 +266,7 @@ class MediaController(object):
|
|||||||
# clean up possible running old media files
|
# clean up possible running old media files
|
||||||
self.finalise()
|
self.finalise()
|
||||||
# update player status
|
# update player status
|
||||||
self.set_active_players()
|
self._set_active_players()
|
||||||
display.hasAudio = True
|
display.hasAudio = True
|
||||||
if display == self.mainWindow.previewController.previewDisplay or \
|
if display == self.mainWindow.previewController.previewDisplay or \
|
||||||
display == self.mainWindow.liveController.previewDisplay:
|
display == self.mainWindow.liveController.previewDisplay:
|
||||||
|
@ -44,7 +44,6 @@ from openlp.core.ui.media import get_media_players, set_media_players
|
|||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
CLAPPERBOARD = QtGui.QImage(u':/media/media_video.png')
|
CLAPPERBOARD = QtGui.QImage(u':/media/media_video.png')
|
||||||
#TODO: Add an appropriate Icon for DVDs, CDs, ...
|
|
||||||
DVD_ICON = QtGui.QImage(u':/media/media_video.png')
|
DVD_ICON = QtGui.QImage(u':/media/media_video.png')
|
||||||
|
|
||||||
class MediaMediaItem(MediaManagerItem):
|
class MediaMediaItem(MediaManagerItem):
|
||||||
|
Loading…
Reference in New Issue
Block a user