Fix DeepSource anti-pattern
This commit is contained in:
parent
80cfe96c8b
commit
615ac41ae3
|
@ -70,9 +70,7 @@ func (mi *MetaInfo) SetDefaults() {
|
|||
|
||||
// Creates a Magnet from a MetaInfo. Optional infohash and parsed info can be provided.
|
||||
func (mi *MetaInfo) Magnet(infoHash *Hash, info *Info) (m Magnet) {
|
||||
for _, t := range mi.UpvertedAnnounceList().DistinctValues() {
|
||||
m.Trackers = append(m.Trackers, t)
|
||||
}
|
||||
m.Trackers = append(m.Trackers, mi.UpvertedAnnounceList().DistinctValues()...)
|
||||
if info != nil {
|
||||
m.DisplayName = info.Name
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue