0

optional delay between downloads

This commit is contained in:
Kaimi
2015-10-22 14:59:54 +03:00
parent df7c3c81c2
commit fe50bbca89
2 changed files with 7 additions and 0 deletions

View File

@@ -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!');