@@ -26,21 +26,22 @@ def load_settings(self):
2626 self .playnite_path = str (pn .DATA_FOLDER )
2727 self .settings ['playnite_path' ] = str (pn .DATA_FOLDER )
2828 self .hide_uninstalled = self .settings .get ('hide_uninstalled' , True )
29- if not Path (self .playnite_path ).exists ():
30- self .add_item (
31- title = 'Library file not found!' ,
32- subtitle = "Please set the path to Playnite\' s data directory in settings." ,
33- icon = ICON_SETTINGS ,
34- method = self .open_setting_dialog
35- )
36- self .add_item (
37- title = 'Install FlowLauncherExporter plugin.' ,
38- subtitle = 'FlowLauncherExporter plugin is required to use this plugin.' ,
39- icon = '' ,
40- method = self .uri ,
41- parameters = [PLUGIN_URI ]
4229
43- )
30+ def missing_library (self ):
31+ self .add_item (
32+ title = 'Library file not found!' ,
33+ subtitle = "Please set the path to Playnite\' s data directory in settings." ,
34+ icon = ICON_SETTINGS ,
35+ method = self .open_setting_dialog
36+ )
37+ self .add_item (
38+ title = 'Install FlowLauncherExporter plugin.' ,
39+ subtitle = 'FlowLauncherExporter plugin is required to use this plugin.' ,
40+ icon = '' ,
41+ method = self .uri ,
42+ parameters = [PLUGIN_URI ]
43+
44+ )
4445
4546 def main_search (self , query ):
4647 for game in self .games :
@@ -82,13 +83,14 @@ def install_filter(self):
8283 self .games = [game for game in self .games if not game .is_installed ]
8384
8485 def uninstalled_filter (self ):
85- self .games = [game for game in self .games if game .is_installed or game .install_directory != None ]
86+ self .games = [game for game in self .games if game .is_installed and ( game .install_directory != None or game . install_directory != "" ) ]
8687
8788 def query (self , query ):
8889 self .load_settings ()
8990 try :
9091 self .games = pn .import_games (self .playnite_path )
9192 except FileNotFoundError :
93+ self .missing_library ()
9294 return
9395 if query .startswith (SOURCE_FILTER ):
9496 query = query [len (SOURCE_FILTER ):]
0 commit comments