From 6b1de660022e4b456820d232d67fb6edf595e47c Mon Sep 17 00:00:00 2001 From: z411 Date: Thu, 9 May 2019 18:37:01 -0400 Subject: [PATCH] Qt: Added the option for quick or full library scan (#398) --- trackma/ui/qt/mainwindow.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/trackma/ui/qt/mainwindow.py b/trackma/ui/qt/mainwindow.py index 8faf2b0a..2863e11f 100644 --- a/trackma/ui/qt/mainwindow.py +++ b/trackma/ui/qt/mainwindow.py @@ -175,9 +175,11 @@ def start(self, account): self.action_retrieve.setShortcut('Ctrl+D') self.action_retrieve.setStatusTip('Discard any changes made to the list and re-download it.') self.action_retrieve.triggered.connect(self.s_retrieve) - action_scan_library = QAction('Rescan &Library', self) + action_scan_library = QAction('Rescan &Library (quick)', self) action_scan_library.setShortcut('Ctrl+L') action_scan_library.triggered.connect(self.s_scan_library) + action_rescan_library = QAction('Rescan &Library (full)', self) + action_rescan_library.triggered.connect(self.s_rescan_library) action_open_folder = QAction('Open containing folder', self) action_open_folder.triggered.connect(self.s_open_folder) @@ -240,6 +242,7 @@ def start(self, account): menu_list.addAction(self.action_retrieve) menu_list.addSeparator() menu_list.addAction(action_scan_library) + menu_list.addAction(action_rescan_library) self.menu_mediatype = menubar.addMenu('&Mediatype') self.mediatype_actiongroup = QActionGroup(self, exclusive=True) self.mediatype_actiongroup.triggered.connect(self.s_mediatype) @@ -1111,6 +1114,9 @@ def s_delete(self): self.worker_call('delete_show', self.r_generic, show) def s_scan_library(self): + self.worker_call('scan_library', self.r_library_scanned, rescan=False) + + def s_rescan_library(self): self.worker_call('scan_library', self.r_library_scanned, rescan=True) def s_altname(self):