File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -251,12 +251,14 @@ def generate_library_tags(self):
251251 db_library_directories = database .DatabaseFunctions (
252252 self .parent .database_path ).fetch_data (
253253 ('Path' ,),
254- 'books' , # This checks the directories table NOT the book one
254+ 'books' , # THIS CHECKS THE BOOKS TABLE
255255 {'Path' : '' },
256256 'LIKE' )
257257
258- library_directories = {
259- i [0 ]: (None , None ) for i in db_library_directories }
258+ library_directories = None
259+ if db_library_directories :
260+ library_directories = {
261+ i [0 ]: (None , None ) for i in db_library_directories }
260262
261263 def get_tags (all_metadata ):
262264 path = os .path .dirname (all_metadata ['path' ])
@@ -282,6 +284,7 @@ def get_tags(all_metadata):
282284 return added_string .lower (), None
283285
284286 # Generate tags for the QStandardItemModel
287+ # This isn't triggered for an empty view model
285288 for i in range (self .view_model .rowCount ()):
286289 this_item = self .view_model .item (i , 0 )
287290 all_metadata = this_item .data (QtCore .Qt .UserRole + 3 )
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ def read_settings(self):
5353 self .parent .settings ['current_view' ] = int (self .settings .value ('currentView' , 0 ))
5454 self .parent .settings ['main_window_headers' ] = self .settings .value ('tableHeaders' , None )
5555 self .parent .settings ['listview_background' ] = self .settings .value (
56- 'listViewBackground' , QtGui .QColor ().fromRgb (76 , 76 , 76 ))
56+ 'listViewBackground' , QtGui .QColor ().fromRgb (33 , 33 , 33 ))
5757 self .parent .settings ['icon_theme' ] = self .settings .value ('iconTheme' , 'DarkIcons' )
5858 self .settings .endGroup ()
5959
You can’t perform that action at this time.
0 commit comments