diff options
Diffstat (limited to 'backend/src/browser.py')
| -rw-r--r-- | backend/src/browser.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/backend/src/browser.py b/backend/src/browser.py index da8569be..96620667 100644 --- a/backend/src/browser.py +++ b/backend/src/browser.py @@ -186,6 +186,18 @@ class PluginBrowser: else: logger.fatal(f"Could not fetch from URL. {await res.text()}") + storeUrl = "" + match self.settings.getSetting("store", 0): + case 0: storeUrl = "https://plugins.deckbrew.xyz/plugins" # default + case 1: storeUrl = "https://testing.deckbrew.xyz/plugins" # testing + case 2: storeUrl = self.settings.getSetting("store-url", "https://plugins.deckbrew.xyz/plugins") # custom + case _: storeUrl = "https://plugins.deckbrew.xyz/plugins" + logger.info(f"Incrementing installs for {name} from URL {storeUrl} (version {version})") + async with ClientSession() as client: + res = await client.post(storeUrl+f"/{name}/versions/{version}/increment?isUpdate={isInstalled}", ssl=get_ssl_context()) + if res.status != 200: + logger.error(f"Server did not accept install count increment request. code: {res.status}") + # Check to make sure we got the file if res_zip is None: logger.fatal(f"Could not fetch {artifact}") |
