Skip to content
This repository has been archived by the owner on Jun 15, 2023. It is now read-only.

Commit

Permalink
fix: StartFile/StopFile not working
Browse files Browse the repository at this point in the history
  • Loading branch information
boypt committed Dec 24, 2019
1 parent 8ba5161 commit 158c654
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion engine/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,13 @@ func (e *Engine) StartTorrent(infohash string) error {
}
}
if t.t.Info() != nil {
t.t.DownloadAll()
// start file by setting the priority
for _, f := range t.t.Files() {
f.SetPriority(torrent.PiecePriorityNormal)
}

// call to DownloadAll cause StartFile/StopFile not working
// t.t.DownloadAll()
}
return nil
}
Expand Down

0 comments on commit 158c654

Please sign in to comment.