diff options
| author | Pinapelz <yukais@pinapelz.com> | 2026-10-12 22:56:43 -0700 |
|---|---|---|
| committer | Pinapelz <yukais@pinapelz.com> | 2026-10-12 23:00:17 -0700 |
| commit | 3f91956ef041cad4b766648a8202ca314808ddc7 (patch) | |
| tree | 63c6284c391d2d98f8e9a5f10e1863c075e90efd /gui.py | |
| parent | 23d5c91b0ad2ecd13e1155cf4966b6d3d99f7dd5 (diff) | |
feat: CD ripping on windows via cueripper
Diffstat (limited to 'gui.py')
| -rw-r--r-- | gui.py | 29 |
1 files changed, 25 insertions, 4 deletions
@@ -1241,7 +1241,7 @@ class MainWindow(QMainWindow): reorg_act = action("Reorganize…", self.reorganize, ("folder-new", SP.SP_FileDialogDetailedView), "Ctrl+Shift+O", "Move every track in the library into Artist / Album folders (with preview)") rip_cd_act = action("Rip CD", self.rip_cd, ("media-optical", SP.SP_DirOpenIcon), - tip="Rip tracks from an audio CD (stub)") + tip="Rip tracks from an audio CD") self.preview_action = action("Preview", self.preview_track, ("media-playback-start", SP.SP_MediaPlay), tip="Open the selected track in the system default player") rules_act = action("Apply Echo Rules", self.process, ("system-run", SP.SP_MediaPlay), "Ctrl+R", @@ -1619,8 +1619,29 @@ class MainWindow(QMainWindow): ok, msg = optical.check_dependencies() if not ok: - QMessageBox.critical(self, "Rip CD", msg) - return + if optical.needs_cuetools_install(): + answer = QMessageBox.question( + self, + "Rip CD", + ( + "CUERipper was not found.\n\n" + "Download and install CUETools now?\n\n" + f"Source: {optical.CUETOOLS_DOWNLOAD_URL}" + ), + QMessageBox.StandardButton.Yes | QMessageBox.StandardButton.No, + QMessageBox.StandardButton.Yes, + ) + if answer == QMessageBox.StandardButton.Yes: + try: + optical.ensure_windows_cuetools(on_output=self.log) + ok, msg = optical.check_dependencies() + except Exception as err: + QMessageBox.critical(self, "Rip CD", f"Failed to install CUETools.\n\n{err}") + return + + if not ok: + QMessageBox.critical(self, "Rip CD", msg) + return drives = optical.get_optical_drives() if not drives: @@ -1637,7 +1658,7 @@ class MainWindow(QMainWindow): self.rip_drive = selected_drive self.log(f"Rip CD selected drive: {self.rip_drive}") - self.log("Starting abcde rip (default config)…") + self.log("Starting CD ripping process…") self._set_busy(True) self.stop_action.setEnabled(False) |
