Use normpath in _tryToFillPlayerPath to avoid doubleslash problems
This commit is contained in:
parent
45b17a8d5b
commit
2c454d2ade
@ -79,7 +79,7 @@ class ConfigDialog(QtGui.QDialog):
|
|||||||
settings = QSettings("Syncplay", "MediaBrowseDialog")
|
settings = QSettings("Syncplay", "MediaBrowseDialog")
|
||||||
settings.beginGroup("PlayerList")
|
settings.beginGroup("PlayerList")
|
||||||
savedPlayers = settings.value("PlayerList", [])
|
savedPlayers = settings.value("PlayerList", [])
|
||||||
playerpathlist = list(set([os.path.normcase(path) for path in set(playerpathlist + savedPlayers)]))
|
playerpathlist = list(set([os.path.normcase(os.path.normpath(path)) for path in set(playerpathlist + savedPlayers)]))
|
||||||
settings.endGroup()
|
settings.endGroup()
|
||||||
foundpath = ""
|
foundpath = ""
|
||||||
|
|
||||||
@ -94,15 +94,15 @@ class ConfigDialog(QtGui.QDialog):
|
|||||||
self.executablepathCombobox.addItem(foundpath)
|
self.executablepathCombobox.addItem(foundpath)
|
||||||
|
|
||||||
for path in playerpathlist:
|
for path in playerpathlist:
|
||||||
if(os.path.isfile(path) and os.path.normcase(path) != os.path.normcase(foundpath)):
|
if(os.path.isfile(path) and os.path.normcase(os.path.normpath(path)) != os.path.normcase(os.path.normpath(foundpath))):
|
||||||
self.executablepathCombobox.addItem(path)
|
self.executablepathCombobox.addItem(path)
|
||||||
if foundpath == "":
|
if foundpath == "":
|
||||||
foundpath = path
|
foundpath = path
|
||||||
|
|
||||||
if foundpath != "":
|
if foundpath != "":
|
||||||
settings.beginGroup("PlayerList")
|
settings.beginGroup("PlayerList")
|
||||||
playerpathlist.append(os.path.normcase(foundpath))
|
playerpathlist.append(os.path.normcase(os.path.normpath(foundpath)))
|
||||||
settings.setValue("PlayerList", list(set([os.path.normcase(path) for path in set(playerpathlist)])))
|
settings.setValue("PlayerList", list(set([os.path.normcase(os.path.normpath(path)) for path in set(playerpathlist)])))
|
||||||
settings.endGroup()
|
settings.endGroup()
|
||||||
return(foundpath)
|
return(foundpath)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user