Update stats.go (#1672)
Cette révision appartient à :
Parent
054a0e07a2
révision
2f0e06cfe4
1 fichiers modifiés avec 7 ajouts et 5 suppressions
|
@ -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 {
|
||||
|
|
Référencer dans un nouveau ticket