mirror of
https://github.com/SteamDeckHomebrew/decky-loader.git
synced 2026-07-11 12:21:58 +00:00
move check for if plugin was installed to the start of the function (#715)
This commit is contained in:
@@ -157,8 +157,16 @@ class PluginBrowser:
|
|||||||
# Will be set later in code
|
# Will be set later in code
|
||||||
res_zip = None
|
res_zip = None
|
||||||
|
|
||||||
# Check if plugin is installed
|
# Check if plugin was already installed before this
|
||||||
isInstalled = False
|
isInstalled = False
|
||||||
|
|
||||||
|
try:
|
||||||
|
pluginFolderPath = self.find_plugin_folder(name)
|
||||||
|
if pluginFolderPath:
|
||||||
|
isInstalled = True
|
||||||
|
except:
|
||||||
|
logger.error(f"Failed to determine if {name} is already installed, continuing anyway.")
|
||||||
|
|
||||||
# Preserve plugin order before removing plugin (uninstall alters the order and removes the plugin from the list)
|
# Preserve plugin order before removing plugin (uninstall alters the order and removes the plugin from the list)
|
||||||
current_plugin_order = self.settings.getSetting("pluginOrder")[:]
|
current_plugin_order = self.settings.getSetting("pluginOrder")[:]
|
||||||
if self.loader.watcher:
|
if self.loader.watcher:
|
||||||
@@ -227,13 +235,6 @@ class PluginBrowser:
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error(f"Failed to read or parse {plugin_json_file}: {str(e)}. Falling back to extracting from path.")
|
logger.error(f"Failed to read or parse {plugin_json_file}: {str(e)}. Falling back to extracting from path.")
|
||||||
|
|
||||||
try:
|
|
||||||
pluginFolderPath = self.find_plugin_folder(name)
|
|
||||||
if pluginFolderPath:
|
|
||||||
isInstalled = True
|
|
||||||
except:
|
|
||||||
logger.error(f"Failed to determine if {name} is already installed, continuing anyway.")
|
|
||||||
|
|
||||||
# Check to make sure we got the file
|
# Check to make sure we got the file
|
||||||
if res_zip is None:
|
if res_zip is None:
|
||||||
logger.fatal(f"Could not fetch {artifact}")
|
logger.fatal(f"Could not fetch {artifact}")
|
||||||
|
|||||||
Reference in New Issue
Block a user