From a9dd3336fbae3274699d8477fdfd4d26d9148c2a Mon Sep 17 00:00:00 2001 From: Tim Bentley Date: Sun, 9 Sep 2012 07:06:44 +0100 Subject: [PATCH] Move media files around --- openlp/core/ui/media/__init__.py | 4 +-- openlp/core/ui/media/mediacontroller.py | 2 +- openlp/core/{lib => ui/media}/mediaplayer.py | 0 openlp/core/ui/media/phononplayer.py | 2 +- openlp/core/ui/media/vendor/__init__.py | 27 ++++++++++++++++++++ openlp/core/ui/media/{ => vendor}/vlc.py | 0 openlp/core/ui/media/vlcplayer.py | 4 +-- openlp/core/ui/media/webkitplayer.py | 2 +- 8 files changed, 34 insertions(+), 7 deletions(-) rename openlp/core/{lib => ui/media}/mediaplayer.py (100%) create mode 100644 openlp/core/ui/media/vendor/__init__.py rename openlp/core/ui/media/{ => vendor}/vlc.py (100%) diff --git a/openlp/core/ui/media/__init__.py b/openlp/core/ui/media/__init__.py index c5e5d9a9c..1880d6454 100644 --- a/openlp/core/ui/media/__init__.py +++ b/openlp/core/ui/media/__init__.py @@ -46,7 +46,7 @@ class MediaState(object): class MediaType(object): """ - An enumeration of possibible Media Types + An enumeration of possible Media Types """ Unused = 0 Audio = 1 @@ -58,7 +58,7 @@ class MediaType(object): class MediaInfo(object): """ - This class hold the media related infos + This class hold the media related info """ file_info = None volume = 100 diff --git a/openlp/core/ui/media/mediacontroller.py b/openlp/core/ui/media/mediacontroller.py index 5e9671f64..90775848c 100644 --- a/openlp/core/ui/media/mediacontroller.py +++ b/openlp/core/ui/media/mediacontroller.py @@ -32,10 +32,10 @@ from PyQt4 import QtCore, QtGui from openlp.core.lib import OpenLPToolbar, Receiver, translate from openlp.core.lib.settings import Settings -from openlp.core.lib.mediaplayer import MediaPlayer from openlp.core.lib.ui import critical_error_message_box from openlp.core.ui.media import MediaState, MediaInfo, MediaType, \ get_media_players, set_media_players +from openlp.core.ui.media.mediaplayer import MediaPlayer from openlp.core.utils import AppLocation log = logging.getLogger(__name__) diff --git a/openlp/core/lib/mediaplayer.py b/openlp/core/ui/media/mediaplayer.py similarity index 100% rename from openlp/core/lib/mediaplayer.py rename to openlp/core/ui/media/mediaplayer.py diff --git a/openlp/core/ui/media/phononplayer.py b/openlp/core/ui/media/phononplayer.py index 94865d16b..48c51d419 100644 --- a/openlp/core/ui/media/phononplayer.py +++ b/openlp/core/ui/media/phononplayer.py @@ -33,8 +33,8 @@ from datetime import datetime from PyQt4.phonon import Phonon from openlp.core.lib import Receiver -from openlp.core.lib.mediaplayer import MediaPlayer from openlp.core.ui.media import MediaState +from openlp.core.ui.media.mediaplayer import MediaPlayer log = logging.getLogger(__name__) diff --git a/openlp/core/ui/media/vendor/__init__.py b/openlp/core/ui/media/vendor/__init__.py new file mode 100644 index 000000000..170b609de --- /dev/null +++ b/openlp/core/ui/media/vendor/__init__.py @@ -0,0 +1,27 @@ +# -*- 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, Samuel Findlay, Michael Gorven, Scott Guerrieri, Matthias Hub, # +# Meinert Jordan, Armin Köhler, Edwin Lunando, Joshua Miller, Stevan Pettit, # +# Andreas Preikschat, Mattias Põldaru, Christian Richter, Philip Ridout, # +# Simon Scudder, Jeffrey Smith, Maikel Stuivenberg, Martin Thompson, Jon # +# Tibble, Dave Warnock, 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 # +############################################################################### diff --git a/openlp/core/ui/media/vlc.py b/openlp/core/ui/media/vendor/vlc.py similarity index 100% rename from openlp/core/ui/media/vlc.py rename to openlp/core/ui/media/vendor/vlc.py diff --git a/openlp/core/ui/media/vlcplayer.py b/openlp/core/ui/media/vlcplayer.py index bf1e7a920..70853cd64 100644 --- a/openlp/core/ui/media/vlcplayer.py +++ b/openlp/core/ui/media/vlcplayer.py @@ -36,14 +36,14 @@ from PyQt4 import QtCore, QtGui from openlp.core.lib import Receiver from openlp.core.lib.settings import Settings -from openlp.core.lib.mediaplayer import MediaPlayer from openlp.core.ui.media import MediaState +from openlp.core.ui.media.mediaplayer import MediaPlayer log = logging.getLogger(__name__) VLC_AVAILABLE = False try: - import vlc + from openlp.core.ui.media.vendor import vlc VLC_AVAILABLE = bool(vlc.get_default_instance()) except (ImportError, NameError, NotImplementedError): pass diff --git a/openlp/core/ui/media/webkitplayer.py b/openlp/core/ui/media/webkitplayer.py index ecf39dfbe..aad9710c0 100644 --- a/openlp/core/ui/media/webkitplayer.py +++ b/openlp/core/ui/media/webkitplayer.py @@ -28,8 +28,8 @@ import logging -from openlp.core.lib.mediaplayer import MediaPlayer from openlp.core.ui.media import MediaState +from openlp.core.ui.media.mediaplayer import MediaPlayer log = logging.getLogger(__name__)