Small fixes

This commit is contained in:
BasioMeusPuga
2018-03-13 19:20:47 +05:30
parent e0b20e36dd
commit 8564ede48b
4 changed files with 13 additions and 5 deletions

View File

@@ -195,6 +195,7 @@ class MainUI(QtWidgets.QMainWindow, mainwindow.Ui_MainWindow):
# The library refresh button on the Library tab
self.reloadLibrary.setIcon(QtGui.QIcon.fromTheme('reload'))
self.reloadLibrary.setObjectName('reloadLibrary')
self.reloadLibrary.setToolTip('Scan library')
self.reloadLibrary.setAutoRaise(True)
self.reloadLibrary.clicked.connect(self.settingsDialog.start_library_scan)
@@ -364,6 +365,9 @@ class MainUI(QtWidgets.QMainWindow, mainwindow.Ui_MainWindow):
{'Hash': ''},
'LIKE')
if not all_covers_db:
return
all_covers = {
i[0]: i[1] for i in all_covers_db}

View File

@@ -152,8 +152,11 @@ class Tab(QtWidgets.QWidget):
self.metadata['hash'],
1, QtCore.Qt.MatchExactly)
self.window().lib_ref.view_model.setData(
matching_item[0], self.metadata['last_accessed'], QtCore.Qt.UserRole + 12)
try:
self.window().lib_ref.view_model.setData(
matching_item[0], self.metadata['last_accessed'], QtCore.Qt.UserRole + 12)
except IndexError: # The file has been deleted
pass
def set_scroll_value(self, switch_widgets=True, search_data=None):
# TODO