From e7ca93f127cccb58d808555da9ca39389dd105c6 Mon Sep 17 00:00:00 2001 From: Clinton Hall Date: Mon, 18 Feb 2013 16:13:19 -0800 Subject: [PATCH] Only look for file name, not ext in Torrent Name --- TorrentToMedia.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/TorrentToMedia.py b/TorrentToMedia.py index 08f45f34..e3b3da77 100755 --- a/TorrentToMedia.py +++ b/TorrentToMedia.py @@ -312,8 +312,9 @@ for dirpath, dirnames, filenames in os.walk(Directory): for file in filenames: if root == 1: Logger.debug("Looking for %s in filename", Name) - if (Name in file) or (file in Name): + if (Name in file) or (os.path.splitext(file)[0] in Name): pass #This file does match the Torrent name + logger.debug("Found file %s that matches Torrent Name %s", file, Name) else: continue #This file does not match the Torrent name. Skip it file_path = os.path.join(dirpath, file)