From b52490cd87ab87c3413b3d484149bd0b312d1e50 Mon Sep 17 00:00:00 2001
From: neodarz <neodarz@neodarz.net>
Date: Sun, 20 Jan 2019 23:55:49 +0100
Subject: Fix detection if file is present or not

---
 convert.py | 5 ++---
 1 file 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
-- 
cgit v1.2.1