mirror of
https://github.com/andwati/kget-capture.git
synced 2026-11-24 21:18:50 +00:00
Add a curl/wget one-line installer and popup setup detection
Add install-remote.sh, which fetches the latest release and runs its install.sh so setup no longer needs a git clone. The popup now probes the native host with a "ping" action on open and, if it's not registered yet, shows the one-liner (with copy-to-clipboard) instead of the auto-capture toggle -- so a Web Store install can be completed end-to-end by clicking the extension icon and pasting one command.
This commit is contained in:
@@ -154,7 +154,17 @@ def spawn_notifier(transfer_path, dest):
|
||||
|
||||
def main():
|
||||
message = read_message()
|
||||
if not message or message.get("action") != "addTransfer" or "url" not in message:
|
||||
if not message:
|
||||
write_message({"ok": False, "error": "invalid request"})
|
||||
return
|
||||
|
||||
# The extension popup uses this to detect whether the native host is
|
||||
# installed/registered at all, distinct from whether a transfer succeeds.
|
||||
if message.get("action") == "ping":
|
||||
write_message({"ok": True})
|
||||
return
|
||||
|
||||
if message.get("action") != "addTransfer" or "url" not in message:
|
||||
write_message({"ok": False, "error": "invalid request"})
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user