Refactor torrent manager
This commit is contained in:
@@ -15,7 +15,7 @@ func createMultiTorrentResponse(basePath string, torrents []torrent.Torrent) (*d
|
||||
seen := make(map[string]bool)
|
||||
|
||||
for _, item := range torrents {
|
||||
if item.Progress != 100 {
|
||||
if item.InProgress {
|
||||
continue
|
||||
}
|
||||
if _, exists := seen[item.AccessKey]; exists {
|
||||
@@ -64,7 +64,7 @@ func createSingleTorrentResponse(basePath string, torrents []torrent.Torrent) (*
|
||||
torrentResponses = append(torrentResponses, dav.File(
|
||||
filePath,
|
||||
file.Bytes,
|
||||
convertRFC3339toRFC1123(torrent.Added),
|
||||
convertRFC3339toRFC1123(torrent.LatestAdded),
|
||||
file.Link,
|
||||
))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user