Rework repair logic
This commit is contained in:
@@ -2,14 +2,15 @@ package torrent
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func getFileIDs(files []*File) []string {
|
||||
func getFileIDs(files []*File) string {
|
||||
var fileIDs []string
|
||||
for _, file := range files {
|
||||
if file.ID != 0 {
|
||||
fileIDs = append(fileIDs, fmt.Sprintf("%d", file.ID))
|
||||
}
|
||||
}
|
||||
return fileIDs
|
||||
return strings.Join(fileIDs, ",")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user