if download fails, don't try to run ffmpeg at all
error handling is still not complete: the job is still considered to be "in progress"
This commit is contained in:
parent
fda08d7d0d
commit
40394331ef
1 changed files with 3 additions and 4 deletions
|
@ -121,11 +121,10 @@ async def create_mp3(
|
|||
intervals = []
|
||||
for begin, start_cut, end_cut in get_files_and_intervals(start, end):
|
||||
try:
|
||||
file = await get_timefile(begin)
|
||||
filename = await get_timefile(begin)
|
||||
except Exception as e:
|
||||
logger.error("Error while retrieving file: %s", e)
|
||||
else:
|
||||
intervals.append((file, start_cut, end_cut))
|
||||
raise ValueError("Error while retrieving file: %s" % e) from e
|
||||
intervals.append((filename, start_cut, end_cut))
|
||||
if os.path.exists(outfile):
|
||||
raise OSError("file '%s' already exists" % outfile)
|
||||
for path, _s, _e in intervals:
|
||||
|
|
Loading…
Reference in a new issue