1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2025-01-31 19:51:34 +01:00

[actions] extend 'wait'

allow specifying a duration like for --sleep
This commit is contained in:
Mike Fährmann 2024-06-29 23:50:52 +02:00
parent 84b3da54aa
commit 8219a78b8d
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

View File

@ -9,6 +9,7 @@
""" """
import re
import time
import logging
import operator
from . import util, exception
@ -87,8 +88,15 @@ def action_exec(opts):
def action_wait(opts):
def _wait(args):
input("Press Enter to continue")
if opts:
seconds = util.build_duration_func(opts)
def _wait(args):
time.sleep(seconds())
else:
def _wait(args):
input("Press Enter to continue")
return _wait