Skip to content

Commit

Permalink
Fix mpv not being able to play youtube
Browse files Browse the repository at this point in the history
  • Loading branch information
Uriziel committed May 4, 2014
1 parent f65346a commit 2f3d873
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions syncplay/players/mplayer.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,11 @@ def __init__(self, playerController, playerPath, filePath, args):
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):
Expand Down

0 comments on commit 2f3d873

Please sign in to comment.