Fix repairs for rared torrents
This commit is contained in:
@@ -190,6 +190,7 @@ func (t *TorrentManager) repair(torrent *Torrent) {
|
||||
|
||||
allPlayable = false
|
||||
if t.Config.GetRarAction() == "extract" && file.ID != 0 {
|
||||
t.repairLog.Debugf("Extracting file %s from rar'ed torrent %s", file.Path, t.GetKey(torrent))
|
||||
info, _ := t.redownloadTorrent(torrent, []string{fmt.Sprintf("%d", file.ID)})
|
||||
if info != nil {
|
||||
t.setToBinOnceDone(info.ID)
|
||||
@@ -381,7 +382,8 @@ func (t *TorrentManager) assignLinks(torrent *Torrent) bool {
|
||||
torrent.SelectedFiles.IterCb(func(_ string, file *File) {
|
||||
if utils.IsPlayable(file.Path) {
|
||||
videoFiles = append(videoFiles, fmt.Sprintf("%d", file.ID))
|
||||
} else {
|
||||
} else if file.ID != 0 {
|
||||
t.repairLog.Debugf("Extracting file %s from rar'ed torrent %s", file.Path, t.GetKey(torrent))
|
||||
info, _ := t.redownloadTorrent(torrent, []string{fmt.Sprintf("%d", file.ID)})
|
||||
if info != nil {
|
||||
t.setToBinOnceDone(info.ID)
|
||||
|
||||
Reference in New Issue
Block a user