diff --git a/internal/torrent/refresh.go b/internal/torrent/refresh.go index 0b3efad..cb55fb1 100644 --- a/internal/torrent/refresh.go +++ b/internal/torrent/refresh.go @@ -150,21 +150,15 @@ func (t *TorrentManager) getMoreInfo(rdTorrent realdebrid.Torrent) *Torrent { } if len(selectedFiles) > len(info.Links) && info.Progress == 100 { if len(info.Links) == 1 { - // this might be a rar file so let's check - unrestrict := t.UnrestrictUntilOk(info.Links[0]) - if unrestrict != nil && strings.HasPrefix(strings.ToLower(unrestrict.Filename), ".rar") { - if t.Config.ShouldDeleteRarFiles() { - t.log.Warnf("Torrent %s id=%s is a rar file, it cannot be repaired. Deleting...", info.Name, info.ID) - t.Api.DeleteTorrent(info.ID) - return nil - } else { - t.log.Warnf("Torrent %s id=%s is a rar file, it cannot be repaired as it's a known Real-Debrid limitation. zurg recommends you delete this torrent or enable delete_rar_files in your config.yml", info.Name, info.ID) - torrent.Unfixable = true - } + // this usually is a rar file issue + if t.Config.ShouldDeleteRarFiles() { + t.log.Warnf("Torrent %s id=%s is a rar file, it cannot be repaired. Deleting...", info.Name, info.ID) + t.Api.DeleteTorrent(info.ID) } else { - t.log.Warnf("Torrent id=%s is partly expired. It has %d selected files but only 1 link", info.ID, len(selectedFiles), len(info.Links)) - torrent.ForRepair = true + t.log.Warnf("Torrent %s id=%s is a rar file, it cannot be repaired as it's a known Real-Debrid limitation. zurg recommends you delete this torrent or add auto_delete_rar_torrents: true in your config.yml", info.Name, info.ID) + torrent.Unfixable = true } + return nil } else { t.log.Warnf("Torrent id=%s is partly expired. It has %d selected files but only %d links", info.ID, len(selectedFiles), len(info.Links)) torrent.ForRepair = true