Rescan after Audacity
This commit is contained in:
parent
83a817234d
commit
0082f76b56
@ -53,8 +53,10 @@ class AudacityManager:
|
|||||||
return
|
return
|
||||||
|
|
||||||
sa_response = self._do_command("SelectAll:")
|
sa_response = self._do_command("SelectAll:")
|
||||||
if sa_response == '\nBatchCommand finished: OK\n':
|
if sa_response == "\nBatchCommand finished: OK\n":
|
||||||
exp_response = self._do_command(f'Export2: Filename="{self.path}" NumChannels=2')
|
exp_response = self._do_command(
|
||||||
|
f'Export2: Filename="{self.path}" NumChannels=2'
|
||||||
|
)
|
||||||
return exp_response
|
return exp_response
|
||||||
else:
|
else:
|
||||||
print("SelectAll response: " + sa_response)
|
print("SelectAll response: " + sa_response)
|
||||||
@ -88,10 +90,12 @@ class AudacityManager:
|
|||||||
return response
|
return response
|
||||||
|
|
||||||
|
|
||||||
def ask_yes_no(title: str, question: str, default_yes: bool = False) -> bool:
|
def ask_yes_no(
|
||||||
|
title: str, question: str, default_yes: bool = False, parent: QMainWindow = None
|
||||||
|
) -> bool:
|
||||||
"""Ask question; return True for yes, False for no"""
|
"""Ask question; return True for yes, False for no"""
|
||||||
|
|
||||||
dlg = QMessageBox()
|
dlg = QMessageBox(parent)
|
||||||
dlg.setWindowTitle(title)
|
dlg.setWindowTitle(title)
|
||||||
dlg.setText(question)
|
dlg.setText(question)
|
||||||
dlg.setStandardButtons(
|
dlg.setStandardButtons(
|
||||||
|
|||||||
@ -571,8 +571,13 @@ class PlaylistTab(QTableView):
|
|||||||
|
|
||||||
audacity = AudacityManager()
|
audacity = AudacityManager()
|
||||||
audacity.open_file(path)
|
audacity.open_file(path)
|
||||||
if ask_yes_no("Export file", "Click yes to export file, no to ignore"):
|
if ask_yes_no(
|
||||||
|
"Export file",
|
||||||
|
"Click yes to export file, no to ignore",
|
||||||
|
parent=self.musicmuster,
|
||||||
|
):
|
||||||
audacity.export_file()
|
audacity.export_file()
|
||||||
|
self._rescan(row_number)
|
||||||
|
|
||||||
def _rescan(self, row_number: int) -> None:
|
def _rescan(self, row_number: int) -> None:
|
||||||
"""Rescan track"""
|
"""Rescan track"""
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user