From 199932d3f9ff03f5b0ecf198fade91ee65b3c5f8 Mon Sep 17 00:00:00 2001 From: tsi-billypom Date: Mon, 24 Mar 2025 09:27:04 -0400 Subject: [PATCH] fix db library path, move to pyqtdarktheme maintained fork --- main.py | 14 ++++++-------- requirements.txt | 2 +- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/main.py b/main.py index c426a0d..66d8532 100644 --- a/main.py +++ b/main.py @@ -121,9 +121,7 @@ class Worker(QRunnable): traceback.print_exc() exctype, value = sys.exc_info()[:2] self.signals.signal_finished.emit((exctype, value, traceback.format_exc())) - error( - f"Worker failed: {exctype} | {value} | {traceback.format_exc()}" - ) + error(f"Worker failed: {exctype} | {value} | {traceback.format_exc()}") else: if result: self.signals.signal_finished.emit() @@ -375,9 +373,7 @@ class ApplicationWindow(QMainWindow, Ui_MainWindow): debug("Deleting album art") audio.save() else: - warning( - "delete_album_art_for_current_song() | no tag called APIC" - ) + warning("delete_album_art_for_current_song() | no tag called APIC") except Exception: traceback.print_exc() exctype, value = sys.exc_info()[:2] @@ -433,7 +429,7 @@ class ApplicationWindow(QMainWindow, Ui_MainWindow): def speed_changed(self, rate: int) -> None: """Handles playback speed changes""" self.player.setPlaybackRate(rate / 50) - self.speedLabel.setText(str(round(rate/50, 2))) + self.speedLabel.setText(str(round(rate / 50, 2))) def on_play_clicked(self) -> None: """Updates the Play & Pause buttons when clicked""" @@ -578,7 +574,9 @@ if __name__ == "__main__": config = ConfigParser() config.read("config.ini") db_filepath: str = config.get("db", "database") - db_path: str = "/".join(db_filepath.split("/").pop()) + db_path = db_filepath.split("/") + db_path.pop() + db_path = "/".join(db_path) # If the db file doesn't exist if not os.path.exists(db_filepath): # If the db directory doesn't exist diff --git a/requirements.txt b/requirements.txt index 6757bf2..0d22d45 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,6 +2,6 @@ mutagen matplotlib pyqt5 pydub -pyqtdarktheme +pyqtdarktheme-fork pyqtgraph scipy