[Core] Ensure magnet name passed to lt in string

This commit is contained in:
bendikro 2016-01-20 17:30:01 +01:00
parent d91e5d894f
commit bebc414136
1 changed files with 2 additions and 1 deletions

View File

@ -322,9 +322,10 @@ class TorrentManager(component.Component):
add_torrent_params["name"] = name add_torrent_params["name"] = name
torrent_id = str(torrent_info.info_hash()) torrent_id = str(torrent_info.info_hash())
elif magnet: elif magnet:
magnet = utf8_encoded(magnet)
magnet_info = get_magnet_info(magnet) magnet_info = get_magnet_info(magnet)
if magnet_info: if magnet_info:
add_torrent_params["url"] = utf8_encoded(magnet) add_torrent_params["url"] = magnet
add_torrent_params["name"] = magnet_info["name"] add_torrent_params["name"] = magnet_info["name"]
torrent_id = magnet_info["info_hash"] torrent_id = magnet_info["info_hash"]
else: else: