From fcb65940d9b58de9f943876ab5ba2124b85b9c0e Mon Sep 17 00:00:00 2001 From: TannerMoore Date: Fri, 29 Apr 2016 23:23:18 +0100 Subject: [PATCH] [AutoAdd] Fix watch dir not accepting uppercase file extension - Auto-add feature will now accept torrents when the .torrent extension has capital letters in it --- deluge/plugins/autoadd/autoadd/core.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/deluge/plugins/autoadd/autoadd/core.py b/deluge/plugins/autoadd/autoadd/core.py index ae767916e..f372075c8 100644 --- a/deluge/plugins/autoadd/autoadd/core.py +++ b/deluge/plugins/autoadd/autoadd/core.py @@ -259,12 +259,13 @@ class Core(CorePluginBase): # Skip directories continue else: - ext = os.path.splitext(filename)[1] + ext = os.path.splitext(filename)[1].lower() if ext == ".torrent": magnet = False elif ext == ".magnet": magnet = True else: + log.debug("File checked for auto-loading is invalid: %s", filename) continue try: filedump = self.load_torrent(filepath, magnet)