mirror of
https://github.com/SteamDeckHomebrew/decky-loader.git
synced 2026-07-11 13:21:59 +00:00
Add log uploading
This commit is contained in:
@@ -266,5 +266,12 @@
|
||||
},
|
||||
"Testing": {
|
||||
"download": "Download"
|
||||
},
|
||||
"LogViewer": {
|
||||
"viewLog": "View Log",
|
||||
"uploadLog": "Upload Log",
|
||||
"textError": "Error loading text",
|
||||
"uploadConfirm": "Are you sure you want to upload this log ?",
|
||||
"uploadDisclaimer": "Depending on how this plugin is written, this log might contain confidential information. Are you sure you want to continue ? If unsure, ask the plugin developer."
|
||||
}
|
||||
}
|
||||
|
||||
@@ -396,4 +396,9 @@ class Utilities:
|
||||
return log_file.read()
|
||||
|
||||
async def upload_log(self, plugin_name: str, log_name: str):
|
||||
raise RuntimeError("Not Implemented")
|
||||
text = await self.get_plugin_log_text(plugin_name, log_name)
|
||||
async with ClientSession() as web:
|
||||
res = await web.put("https://lp.deckbrew.xyz", data=text)
|
||||
res.raise_for_status()
|
||||
upload_id = (await res.json())["id"]
|
||||
return f"https://lp.deckbrew.xyz/{upload_id}"
|
||||
Reference in New Issue
Block a user