From 1fc1cc0d47d20a866c184c454ca51f65e74a502f Mon Sep 17 00:00:00 2001 From: Uriziel Date: Thu, 13 Jun 2013 12:19:34 +0200 Subject: [PATCH] File is required for starting MPV/Mplayer now --- syncplay/ui/ConfigurationGetter.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/syncplay/ui/ConfigurationGetter.py b/syncplay/ui/ConfigurationGetter.py index d537909..8ba842f 100644 --- a/syncplay/ui/ConfigurationGetter.py +++ b/syncplay/ui/ConfigurationGetter.py @@ -96,6 +96,9 @@ class ConfigurationGetter(object): self._config["playerClass"] = player else: raise InvalidConfigValue("Player path is not set properly") + if player.__name__ in ['MpvPlayer', 'MplayerPlayer']: + if not self._config['file']: + raise InvalidConfigValue("File must be selected before starting your player") elif(key == "host"): self._config["host"], self._config["port"] = self._splitPortAndHost(self._config["host"]) hostNotValid = (self._config["host"] == "" or self._config["host"] is None)