From 2f3d873e2f72296e7ea6e4697bcc9bee3af012d1 Mon Sep 17 00:00:00 2001 From: Uriziel Date: Sun, 4 May 2014 21:37:04 +0200 Subject: [PATCH] Fix mpv not being able to play youtube --- syncplay/players/mplayer.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/syncplay/players/mplayer.py b/syncplay/players/mplayer.py index 445bf2a..c3c289d 100644 --- a/syncplay/players/mplayer.py +++ b/syncplay/players/mplayer.py @@ -202,9 +202,11 @@ class MplayerPlayer(BasePlayer): self.__playerController = playerController if(not filePath): raise ValueError() - if not os.path.isfile(filePath) and 'PWD' in os.environ: - filePath = os.environ['PWD'] + os.path.sep + filePath - filePath = os.path.realpath(filePath) + if '://' not in filePath: + if not os.path.isfile(filePath) and 'PWD' in os.environ: + filePath = os.environ['PWD'] + os.path.sep + filePath + filePath = os.path.realpath(filePath) + call = [playerPath, filePath] call.extend(playerController.SLAVE_ARGS) if(args):