Update stats.go (#1672)
Cette révision appartient à :
Parent
054a0e07a2
révision
2f0e06cfe4
1 fichiers modifiés avec 7 ajouts et 5 suppressions
|
@ -27,6 +27,7 @@ func GetStatsHandler(c *gin.Context) {
|
||||||
}
|
}
|
||||||
|
|
||||||
var Trackers []string
|
var Trackers []string
|
||||||
|
if len(Trackers) > 3 {
|
||||||
for _, line := range strings.Split(torrent.Trackers[3:], "&tr=") {
|
for _, line := range strings.Split(torrent.Trackers[3:], "&tr=") {
|
||||||
tracker, error := url.QueryUnescape(line)
|
tracker, error := url.QueryUnescape(line)
|
||||||
if error == nil && strings.Contains(tracker, "udp://") {
|
if error == nil && strings.Contains(tracker, "udp://") {
|
||||||
|
@ -34,6 +35,7 @@ func GetStatsHandler(c *gin.Context) {
|
||||||
}
|
}
|
||||||
//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 {
|
for _, line := range config.Get().Torrents.Trackers.Default {
|
||||||
if !contains(Trackers, line) {
|
if !contains(Trackers, line) {
|
||||||
|
|
Référencer dans un nouveau ticket