diff options
author | NeodarZ <neodarz@neodarz.net> | 2017-10-15 13:55:09 +0200 |
---|---|---|
committer | NeodarZ <neodarz@neodarz.net> | 2017-10-15 13:55:09 +0200 |
commit | 58f5a092be9509212a9af82f34a899a9b417c78b (patch) | |
tree | 5eadc6e7b1978e4b4ebb8fc5308d75a14b2a80ac | |
parent | e3f3ddd59fb8ce9b9ca15b699ef08d985f684ec8 (diff) | |
download | convert.py-58f5a092be9509212a9af82f34a899a9b417c78b.tar.xz convert.py-58f5a092be9509212a9af82f34a899a9b417c78b.zip |
Fix bug when file mp3 doesn't exist the script don't print the actual converted file
Diffstat (limited to '')
-rwxr-xr-x | convert.py | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -58,8 +58,8 @@ for file in sorted(os.listdir(sourcedir)): if os.path.isfile(outdir+"/"+name+".mp3"): if os.path.getsize(path_rm_end_slash(sourcedir)+"/"+name+".mp4") == os.path.getsize(outdir+"/"+name+".mp3"): print("File "+path_rm_end_slash(sourcedir)+"/"+name+".mp3 already exist. Use -y for overwrite.") - else: - print("Converting : "+name) + else: + print("Converting : "+name) count += 1 #cmd = ["ffmpeg", "-n", "-i", sourcedir+"/"+name+".mp4", "-c:a", "libmp3lame", outdir+"/"+name+".mp3"]² cmd = "ffmpeg "+arg+" -i '"+path_rm_end_slash(sourcedir)+"/"+name+".mp4' -c:a libmp3lame '"+outdir+"/"+name+".mp3'" |