mirror of
https://github.com/onionshare/onionshare.git
synced 2025-07-30 18:09:01 -04:00
Implements a shutdown timer to stop a share automatically (downloaded or not) after N hours
This commit is contained in:
parent
6cd4b4391d
commit
c6f36e2086
8 changed files with 100 additions and 7 deletions
|
@ -64,6 +64,7 @@ def main():
|
|||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('--local-only', action='store_true', dest='local_only', help=strings._("help_local_only"))
|
||||
parser.add_argument('--stay-open', action='store_true', dest='stay_open', help=strings._("help_stay_open"))
|
||||
parser.add_argument('--shutdown-timeout', metavar='shutdown_timeout', dest='shutdown_timeout', default=0, help=strings._("help_shutdown_timeout"))
|
||||
parser.add_argument('--debug', action='store_true', dest='debug', help=strings._("help_debug"))
|
||||
parser.add_argument('--filenames', metavar='filenames', nargs='+', help=strings._('help_filename'))
|
||||
parser.add_argument('--config', metavar='config', default=False, help=strings._('help_config'))
|
||||
|
@ -78,6 +79,7 @@ def main():
|
|||
|
||||
local_only = bool(args.local_only)
|
||||
stay_open = bool(args.stay_open)
|
||||
shutdown_timeout = float(args.shutdown_timeout)
|
||||
debug = bool(args.debug)
|
||||
|
||||
# Debug mode?
|
||||
|
@ -103,7 +105,7 @@ def main():
|
|||
|
||||
# Start the OnionShare app
|
||||
web.set_stay_open(stay_open)
|
||||
app = OnionShare(onion, local_only, stay_open)
|
||||
app = OnionShare(onion, local_only, stay_open, shutdown_timeout)
|
||||
|
||||
# Launch the gui
|
||||
gui = OnionShareGui(onion, qtapp, app, filenames, config)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue