Albirew/nyaa-pantsu
Archivé
1
0
Bifurcation 0

Update stats.go (#1672)

Cette révision appartient à :
kilo 2017-10-16 04:55:38 +02:00 révisé par GitHub
Parent 054a0e07a2
révision 2f0e06cfe4

Voir le fichier

@ -27,12 +27,14 @@ func GetStatsHandler(c *gin.Context) {
}
var Trackers []string
for _, line := range strings.Split(torrent.Trackers[3:], "&tr=") {
tracker, error := url.QueryUnescape(line)
if error == nil && strings.Contains(tracker, "udp://") {
Trackers = append(Trackers, tracker)
if len(Trackers) > 3 {
for _, line := range strings.Split(torrent.Trackers[3:], "&tr=") {
tracker, error := url.QueryUnescape(line)
if error == nil && strings.Contains(tracker, "udp://") {
Trackers = append(Trackers, tracker)
}
//Cannot scrape from http trackers so don't put them in the array
}
//Cannot scrape from http trackers so don't put them in the array
}
for _, line := range config.Get().Torrents.Trackers.Default {