From 0f36d828ea53166a037555cf5411c60a4e89bcb6 Mon Sep 17 00:00:00 2001 From: Etoh Date: Sun, 23 Jun 2013 17:35:11 +0200 Subject: [PATCH] Allow filepath to be URL (in GuiConfig) --- syncplay/ui/GuiConfiguration.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/syncplay/ui/GuiConfiguration.py b/syncplay/ui/GuiConfiguration.py index 1bad9d1..776ac10 100644 --- a/syncplay/ui/GuiConfiguration.py +++ b/syncplay/ui/GuiConfiguration.py @@ -151,7 +151,12 @@ class ConfigDialog(QtGui.QDialog): self.config['room'] = self.defaultroomTextbox.text() self.config['password'] = self.serverpassTextbox.text() self.config['playerPath'] = unicode(self.executablepathCombobox.currentText()) - self.config['file'] = os.path.abspath(self.mediapathTextbox.text()) if self.mediapathTextbox.text() != "" else None + if self.mediapathTextbox.text() == "": + self.config['file'] = None + elif os.path.isfile(os.path.abspath(self.mediapathTextbox.text())): + self.config['file'] = os.path.abspath(self.mediapathTextbox.text()) + else: + self.config['file'] = unicode(self.mediapathTextbox.text()) if self.alwaysshowCheckbox.isChecked() == True: self.config['forceGuiPrompt'] = True else: