skip media when folder exists, even if empty

This commit is contained in:
Nick Sweeting 2019-02-04 19:21:00 -08:00
parent 901666bae6
commit b8e5e1d5bd

View file

@ -496,7 +496,7 @@ def fetch_media(link_dir, link, timeout=MEDIA_TIMEOUT, overwrite=False):
# import ipdb; ipdb.set_trace() # import ipdb; ipdb.set_trace()
output = os.path.join(link_dir, 'media') output = os.path.join(link_dir, 'media')
already_done = os.path.exists(output) and os.listdir(output) already_done = os.path.exists(output) # and os.listdir(output)
if already_done and not overwrite: if already_done and not overwrite:
return {'output': 'media', 'status': 'skipped'} return {'output': 'media', 'status': 'skipped'}