Skip to content

Commit

Permalink
Fixed wrong filter for file browser
Browse files Browse the repository at this point in the history
  • Loading branch information
CorentinJ committed Jun 28, 2019
1 parent f41915c commit 3f55ab1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions toolbox/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ def load_from_browser(self, fpath=None):
# Select the next utterance
if self.ui.auto_next_checkbox.isChecked():
self.ui.browser_select_next()
elif fpath == "":
return
else:
name = fpath.name
speaker_name = fpath.parent.name
Expand Down
4 changes: 2 additions & 2 deletions toolbox/ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,9 @@ def browse_file(self):
fpath = QFileDialog().getOpenFileName(
parent=self,
caption="Select an audio file",
filter="*.mp3;*.flac;*.wav;*.m4a"
filter="Audio Files (*.mp3 *.flac *.wav *.m4a)"
)
return Path(fpath[0]) if fpath[0] != "" else None
return Path(fpath[0]) if fpath[0] != "" else ""

@staticmethod
def repopulate_box(box, items, random=False):
Expand Down

0 comments on commit 3f55ab1

Please sign in to comment.