Skip to content

Commit

Permalink
Qt: Added the option for quick or full library scan (#398)
Browse files Browse the repository at this point in the history
  • Loading branch information
z411 committed May 9, 2019
1 parent 8c871bb commit 6b1de66
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion trackma/ui/qt/mainwindow.py
Original file line number Diff line number Diff line change
@@ -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):

0 comments on commit 6b1de66

Please sign in to comment.