Allow filepath to be URL (in GuiConfig)

This commit is contained in:
Etoh 2013-06-23 17:35:11 +02:00
parent 3aea61d01f
commit 0f36d828ea

View File

@ -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: