Skip to content

Commit

Permalink
print piece
Browse files Browse the repository at this point in the history
  • Loading branch information
mh0lt committed Jul 17, 2024
1 parent 79dd030 commit 636e8d6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion t.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package torrent

import (
"fmt"
"strconv"
"strings"
"time"
Expand Down Expand Up @@ -127,7 +128,7 @@ func (t *Torrent) Seeding() (ret bool) {
func (t *Torrent) SetDisplayName(dn string) {
t.imu.Lock()
defer t.imu.Unlock()

if !t.haveInfo(false) {
t.displayName = dn
}
Expand Down Expand Up @@ -214,6 +215,7 @@ func (t *Torrent) DownloadPieces(begin, end pieceIndex) {
// don't lock out all processing between pieces while pieces are updated
t.mu.Lock()
defer t.mu.Unlock()
fmt.Println("DP", t.name(false), i, t.pieces[i].completion(true, false).Complete)
if t.pieces[i].priority.Raise(PiecePriorityNormal) {
if t.updatePiecePriorityNoTriggers(i, false) && !haveTrigger {
haveTrigger = true
Expand Down

0 comments on commit 636e8d6

Please sign in to comment.