Try reading rar contents

This commit is contained in:
Ben Sarmiento
2024-05-27 05:20:40 +02:00
parent de5cf68841
commit fb37fd69e1
6 changed files with 89 additions and 1 deletions

View File

@@ -316,6 +316,12 @@ func (t *TorrentManager) assignLinks(torrent *Torrent) bool {
if !assigned {
// if not assigned and is a rar, likely it was rar'ed by RD
if strings.HasSuffix(strings.ToLower(unrestrict.Filename), ".rar") {
// t.log.Debugf("Trying to get contents of rar file %s", unrestrict.Filename)
// contents, err := t.rarReader.GetRARContents(unrestrict.Download)
// if err != nil {
// t.repairLog.Warnf("Cannot get contents of rar file %s: %v", unrestrict.Filename, err)
// }
// t.log.Debugf("contents: %v", contents)
rarCount++
} else {
t.repairLog.Warnf("Cannot assign %s to any file in torrent %s", unrestrict.Filename, t.GetKey(torrent))