optional delay between downloads
This commit is contained in:
@@ -19,6 +19,7 @@ ya.pl [-adkpt] [long options...]
|
||||
--proxy HTTP-proxy (format: 1.2.3.4:8888)
|
||||
--exclude skip tracks specified in file
|
||||
--include download only tracks specified in file
|
||||
--delay delay between downloads (in seconds)
|
||||
|
||||
--debug print debug info during work
|
||||
--help print usage
|
||||
|
||||
@@ -170,6 +170,7 @@ my ($opt, $usage) = Getopt::Long::Descriptive::describe_options
|
||||
['proxy=s', 'HTTP-proxy (format: 1.2.3.4:8888)'],
|
||||
['exclude=s', 'skip tracks specified in file'],
|
||||
['include=s', 'download only tracks specified in file'],
|
||||
['delay=i', 'delay between downloads (in seconds)'],
|
||||
[],
|
||||
['debug', 'print debug info during work'],
|
||||
['help', 'print usage'],
|
||||
@@ -324,6 +325,11 @@ if($opt{album} || ($opt{playlist} && $opt{kind}))
|
||||
}
|
||||
|
||||
fetch_track($track_info_ref);
|
||||
|
||||
if($opt{delay})
|
||||
{
|
||||
sleep $opt{delay};
|
||||
}
|
||||
}
|
||||
|
||||
info(OK, 'Done!');
|
||||
|
||||
Reference in New Issue
Block a user