Corrected syntax bug in openAddMediaDirectoryDialog

This commit is contained in:
alby128 2017-10-19 21:49:01 +02:00
parent 323a0790b6
commit 2703daa76a

View File

@ -1046,11 +1046,11 @@ class MainWindow(QtWidgets.QMainWindow):
@needsClient
def openAddMediaDirectoryDialog(self, MediaDirectoriesTextbox, MediaDirectoriesDialog):
if sys.platform.startswith('darwin'):
if sys.platform.startswith('darwin') and IsPySide:
options = QtWidgets.QFileDialog.Options(QtWidgets.QFileDialog.ShowDirsOnly | QtWidgets.QFileDialog.DontUseNativeDialog)
else:
options = QtWidgets.QFileDialog.Options(QtWidgets.QFileDialog.ShowDirsOnly)
folderName = unicode(QtGui.QFileDialog.getExistingDirectory(self,None,self.getInitialMediaDirectory(includeUserSpecifiedDirectories=False),options))
folderName = unicode(QtWidgets.QFileDialog.getExistingDirectory(self,None,self.getInitialMediaDirectory(includeUserSpecifiedDirectories=False),options))
if folderName:
existingMediaDirs = MediaDirectoriesTextbox.toPlainText()