diff options
author | neodarz <neodarz@neodarz.net> | 2019-01-20 23:55:49 +0100 |
---|---|---|
committer | neodarz <neodarz@neodarz.net> | 2019-01-20 23:55:49 +0100 |
commit | b52490cd87ab87c3413b3d484149bd0b312d1e50 (patch) | |
tree | 63b1b41a1ff85037e8f47ff79c81c2a357d3546b | |
parent | a775c840568bab6f6e39a0c468edc2e1c764be1e (diff) | |
download | convert.py-b52490cd87ab87c3413b3d484149bd0b312d1e50.tar.xz convert.py-b52490cd87ab87c3413b3d484149bd0b312d1e50.zip |
Fix detection if file is present or not
Diffstat (limited to '')
-rwxr-xr-x | convert.py | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -56,9 +56,8 @@ for file in sorted(os.listdir(sourcedir)): ext = [".mp4", ".mkv", ".webm"] if file.endswith(tuple(ext)): exist = False - if os.path.isfile(outdir+"/"+name+".mp3"): - if os.path.getsize(path_rm_end_slash(sourcedir)+"/"+file) == os.path.getsize(outdir+"/"+name+".mp3"): - print("File "+path_rm_end_slash(sourcedir)+"/"+name+".mp3 already exist. Use -y for overwrite.") + if os.path.isfile(outdir+"/"+name+".mp3") and arg == "-n": + print("File "+path_rm_end_slash(sourcedir)+"/"+name+".mp3 already exist. Use -y for overwrite.") else: print("Converting : "+file) count += 1 |