[AutoAdd] Remove duplicate magnet extension when splitting

This commit is contained in:
Calum Lind 2017-02-20 13:22:03 +00:00
parent bcf0fe4a61
commit 2d4dec669e

View File

@ -203,7 +203,7 @@ class Core(CorePluginBase):
break
else:
short_hash = magnet.split("btih:")[1][:8]
mname = '.'.join([filename, short_hash, "magnet"])
mname = '.'.join([os.path.splitext(filename)[0], short_hash, "magnet"])
try:
_mfile = open(mname, "w")
except IOError, e: