From 70a307a5ea079656c59370ee067912f2f985ee9c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Kupai=20J=C3=B3zsef?= Date: Sat, 10 Oct 2015 14:31:02 +0200 Subject: [PATCH] fix: added announce to torrent spec --- client.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/client.go b/client.go index 57736273..a5139307 100644 --- a/client.go +++ b/client.go @@ -2140,6 +2140,13 @@ func TorrentSpecFromMetaInfo(mi *metainfo.MetaInfo) (spec *TorrentSpec) { Info: &mi.Info, DisplayName: mi.Info.Name, } + + if len(spec.Trackers) == 0 { + spec.Trackers = [][]string{[]string{mi.Announce}} + } else { + spec.Trackers[0] = append(spec.Trackers[0], mi.Announce) + } + CopyExact(&spec.InfoHash, &mi.Info.Hash) return } -- 2.48.1