From eb6f87d773747892119d587609bc93e98f112d2f Mon Sep 17 00:00:00 2001 From: Andy Balaam Date: Wed, 8 Jun 2011 20:40:55 +0100 Subject: [PATCH] Delete the mp3 version of a file when you delete the avi, if it exists. --- src/rtv_delete.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/rtv_delete.py b/src/rtv_delete.py index fb96b13..f33c309 100644 --- a/src/rtv_delete.py +++ b/src/rtv_delete.py @@ -9,6 +9,11 @@ def _delete_file( base_dir, filename ): print fullpath os.remove( fullpath ) + mp3path = fullpath + ".mp3" + if os.path.isfile( mp3path ): + print mp3path + os.remove( mp3path ) + def collect_walk_no_slashes( top_dir ): len_top_dir = len( top_dir ) + 1 ret = {} -- 2.11.4.GIT