Add more logging
This commit is contained in:
@@ -184,7 +184,7 @@ func (t *TorrentManager) repair(torrent *Torrent) {
|
||||
} else if info != nil && info.IsDone() && !t.isStillBroken(info, brokenFiles) {
|
||||
torrent.SelectedFiles.IterCb(func(_ string, oldFile *File) {
|
||||
for ix, newFile := range info.Files {
|
||||
if oldFile.ID == newFile.ID {
|
||||
if oldFile.Bytes == newFile.Bytes {
|
||||
oldFile.Link = info.Links[ix]
|
||||
break
|
||||
}
|
||||
@@ -497,7 +497,7 @@ func (t *TorrentManager) isStillBroken(info *realdebrid.TorrentInfo, brokenFiles
|
||||
// check if the broken files can now be unrestricted
|
||||
for _, oldFile := range brokenFiles {
|
||||
for idx, newFile := range selectedFiles {
|
||||
if oldFile.Path == newFile.Path || oldFile.Bytes == newFile.Bytes {
|
||||
if oldFile.Bytes == newFile.Bytes {
|
||||
unrestrict := t.UnrestrictUntilOk(selectedFiles[idx].Link)
|
||||
if unrestrict == nil || oldFile.Bytes != unrestrict.Filesize {
|
||||
return true
|
||||
@@ -529,7 +529,7 @@ func (t *TorrentManager) handleFixers(fixer realdebrid.Torrent) *Torrent {
|
||||
if !t.isStillBroken(info, brokenFiles) {
|
||||
torrent.SelectedFiles.IterCb(func(_ string, oldFile *File) {
|
||||
for ix, newFile := range info.Files {
|
||||
if oldFile.ID == newFile.ID {
|
||||
if oldFile.Bytes == newFile.Bytes {
|
||||
oldFile.Link = info.Links[ix]
|
||||
break
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user