Rework repair logic

This commit is contained in:
Ben Sarmiento
2024-01-26 08:36:30 +01:00
parent b2bd188736
commit 92a507c693
5 changed files with 179 additions and 137 deletions

View File

@@ -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, ",")
}