diff --git a/syncplay/players/basePlayer.py b/syncplay/players/basePlayer.py index 97fc2a2..5093668 100644 --- a/syncplay/players/basePlayer.py +++ b/syncplay/players/basePlayer.py @@ -82,7 +82,13 @@ class BasePlayer(object): @staticmethod def getExpandedPath(path): raise NotImplementedError() - + + ''' + Opens a custom media browse dialog, and then changes to that media if appropriate + ''' + @staticmethod + def openCustomOpenDialog(self): + raise NotImplementedError() class DummyPlayer(BasePlayer): diff --git a/syncplay/players/mpc.py b/syncplay/players/mpc.py index d23d857..d79a9ef 100644 --- a/syncplay/players/mpc.py +++ b/syncplay/players/mpc.py @@ -306,6 +306,7 @@ class MpcHcApi: class MPCHCAPIPlayer(BasePlayer): speedSupported = False + customOpenDialog = False def __init__(self, client): from twisted.internet import reactor diff --git a/syncplay/players/mplayer.py b/syncplay/players/mplayer.py index c01ac5f..db14c91 100644 --- a/syncplay/players/mplayer.py +++ b/syncplay/players/mplayer.py @@ -9,6 +9,7 @@ import os class MplayerPlayer(BasePlayer): speedSupported = True + customOpenDialog = False RE_ANSWER = re.compile(constants.MPLAYER_ANSWER_REGEX) POSITION_QUERY = 'time_pos' OSD_QUERY = 'osd_show_text' diff --git a/syncplay/players/vlc.py b/syncplay/players/vlc.py index 18a77a6..dd35517 100644 --- a/syncplay/players/vlc.py +++ b/syncplay/players/vlc.py @@ -13,6 +13,7 @@ from syncplay.messages import getMessage class VlcPlayer(BasePlayer): speedSupported = True + customOpenDialog = False RE_ANSWER = re.compile(constants.VLC_ANSWER_REGEX) SLAVE_ARGS = constants.VLC_SLAVE_ARGS if not sys.platform.startswith('darwin'): diff --git a/syncplay/ui/gui.py b/syncplay/ui/gui.py index 0bc77f2..5b02d8b 100644 --- a/syncplay/ui/gui.py +++ b/syncplay/ui/gui.py @@ -341,6 +341,10 @@ class MainWindow(QtGui.QMainWindow): settings.endGroup() def browseMediapath(self): + if self._syncplayClient._player.customOpenDialog == True: + self._syncplayClient._player.openCustomOpenDialog() + return + self.loadMediaBrowseSettings() options = QtGui.QFileDialog.Options() if os.path.isdir(self.mediadirectory):