Proper logging and fixing for unavailable files

This commit is contained in:
Ben Sarmiento
2023-11-26 13:04:40 +01:00
parent c715a4a833
commit 5f65a3873b
5 changed files with 40 additions and 20 deletions

View File

@@ -538,7 +538,7 @@ func (t *TorrentManager) repairAll() {
allTorrents, _ := t.DirectoryMap.Get(ALL_TORRENTS)
allTorrents.IterCb(func(_ string, torrent *Torrent) {
if torrent.InProgress() {
if torrent.AnyInProgress() {
t.log.Debugf("Skipping %s for repairs because it is in progress", torrent.AccessKey)
return
}
@@ -588,7 +588,7 @@ func (t *TorrentManager) Repair(accessKey string) {
return
}
if torrent.InProgress() {
if torrent.AnyInProgress() {
t.log.Infof("Torrent %s is in progress, cannot repair", torrent.AccessKey)
return
}