mirror of
https://github.com/l1ving/youtube-dl
synced 2025-02-14 05:42:51 +08:00
For option --lastrun creates file if not exist...
For option --lastrun creates file if not exist and use DATE now.
This commit is contained in:
parent
c93277812e
commit
e071e4cb8f
@ -534,6 +534,10 @@ def _real_main(argv=None):
|
||||
date = DateRange.day(opts.date)
|
||||
else:
|
||||
if opts.lastrun:
|
||||
if not os.path.exists(opts.lastrun):
|
||||
with open(opts.lastrun, "w") as conf:
|
||||
conf.write(date_from_str("now"))
|
||||
|
||||
with open(opts.lastrun, "r") as conf:
|
||||
date = DateRange(conf.read(), opts.datebefore)
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user