skip already existing files
This commit is contained in:
parent
f333faeff8
commit
4a9d9f2373
1 changed files with 1 additions and 0 deletions
|
@ -22,6 +22,7 @@ def download_track(track, args):
|
||||||
os.makedirs(join(args.download_base, fdir), exist_ok=True)
|
os.makedirs(join(args.download_base, fdir), exist_ok=True)
|
||||||
if exists(fpath):
|
if exists(fpath):
|
||||||
log.info('file %s exists, skipping' % fpath)
|
log.info('file %s exists, skipping' % fpath)
|
||||||
|
return
|
||||||
log.debug('download in ' + fpath)
|
log.debug('download in ' + fpath)
|
||||||
resp = requests.get(track['url'], stream=True)
|
resp = requests.get(track['url'], stream=True)
|
||||||
if not resp.ok:
|
if not resp.ok:
|
||||||
|
|
Loading…
Reference in a new issue