check if source files exist; closes #9
This commit is contained in:
parent
1af5393441
commit
f7cfb3a3e5
1 changed files with 5 additions and 1 deletions
|
@ -91,9 +91,13 @@ def create_mp3(start, end, outfile, options={}, **kwargs):
|
||||||
intervals = [(get_timefile(begin), start_cut, end_cut)
|
intervals = [(get_timefile(begin), start_cut, end_cut)
|
||||||
for begin, start_cut, end_cut
|
for begin, start_cut, end_cut
|
||||||
in get_files_and_intervals(start, end)]
|
in get_files_and_intervals(start, end)]
|
||||||
p = Popen(mp3_join(intervals, outfile) + get_config()['FFMPEG_OPTIONS'])
|
|
||||||
if os.path.exists(outfile):
|
if os.path.exists(outfile):
|
||||||
raise OSError("file '%s' already exists" % outfile)
|
raise OSError("file '%s' already exists" % outfile)
|
||||||
|
for path, _s, _e in intervals:
|
||||||
|
if not os.path.exists(path):
|
||||||
|
raise OSError("file '%s' does not exist; recording system broken?"
|
||||||
|
% path)
|
||||||
|
p = Popen(mp3_join(intervals, outfile) + get_config()['FFMPEG_OPTIONS'])
|
||||||
if get_config()['FORGE_TIMEOUT'] == 0:
|
if get_config()['FORGE_TIMEOUT'] == 0:
|
||||||
p.wait()
|
p.wait()
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue