[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
This commit is contained in:
TannerMoore 2016-04-29 23:23:18 +01:00 committed by Calum Lind
parent c2d7f3c653
commit 50d504a38f
1 changed files with 2 additions and 1 deletions

View File

@ -252,12 +252,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)