aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorneodarz <neodarz@neodarz.net>2019-01-20 23:55:49 +0100
committerneodarz <neodarz@neodarz.net>2019-01-20 23:55:49 +0100
commitb52490cd87ab87c3413b3d484149bd0b312d1e50 (patch)
tree63b1b41a1ff85037e8f47ff79c81c2a357d3546b
parenta775c840568bab6f6e39a0c468edc2e1c764be1e (diff)
downloadconvert.py-b52490cd87ab87c3413b3d484149bd0b312d1e50.tar.xz
convert.py-b52490cd87ab87c3413b3d484149bd0b312d1e50.zip
Fix detection if file is present or not
Diffstat (limited to '')
-rwxr-xr-xconvert.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/convert.py b/convert.py
index 4a55d08..9c3662e 100755
--- a/convert.py
+++ b/convert.py
@@ -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