summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeodarZ <neodarz@neodarz.net>2017-10-15 13:55:09 +0200
committerNeodarZ <neodarz@neodarz.net>2017-10-15 13:55:09 +0200
commit561e58bce1d7464fcd3fe6a778848d2df7bf7b40 (patch)
tree3f6966cb6bcb6e05da15f5981e966fe0c34815db
parenteeaf382d813ad0ea7768cf4a9b169e702ee097a5 (diff)
downloadvideo_save-561e58bce1d7464fcd3fe6a778848d2df7bf7b40.tar.xz
video_save-561e58bce1d7464fcd3fe6a778848d2df7bf7b40.zip
Fix bug when file mp3 doesn't exist the script don't print the actual converted file
-rwxr-xr-xconvert.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/convert.py b/convert.py
index 3951ab1..0316127 100755
--- a/convert.py
+++ b/convert.py
@@ -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'"