mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-19 21:46:11 +05:00
update
This commit is contained in:
@@ -65,6 +65,10 @@ func GetTorrent(hashHex string) *Torrent {
|
|||||||
go func() {
|
go func() {
|
||||||
tr, _ := NewTorrent(tor.TorrentSpec, bts)
|
tr, _ := NewTorrent(tor.TorrentSpec, bts)
|
||||||
if tr != nil {
|
if tr != nil {
|
||||||
|
tr.Title = tor.Title
|
||||||
|
tr.Poster = tor.Poster
|
||||||
|
tr.Size = tor.Size
|
||||||
|
tr.Timestamp = tor.Timestamp
|
||||||
tr.GotInfo()
|
tr.GotInfo()
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|||||||
@@ -4,11 +4,12 @@ import (
|
|||||||
"sort"
|
"sort"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/anacrolix/torrent"
|
|
||||||
"server/log"
|
"server/log"
|
||||||
"server/settings"
|
"server/settings"
|
||||||
"server/torr/utils"
|
"server/torr/utils"
|
||||||
|
|
||||||
|
"github.com/anacrolix/torrent"
|
||||||
|
|
||||||
"github.com/anacrolix/torrent/metainfo"
|
"github.com/anacrolix/torrent/metainfo"
|
||||||
"github.com/anacrolix/torrent/storage"
|
"github.com/anacrolix/torrent/storage"
|
||||||
)
|
)
|
||||||
@@ -137,14 +138,15 @@ func (c *Cache) getRemPieces() []*Piece {
|
|||||||
loading := 0
|
loading := 0
|
||||||
used := c.bufferPull.Used()
|
used := c.bufferPull.Used()
|
||||||
for u := range used {
|
for u := range used {
|
||||||
v := c.pieces[u]
|
if v, ok := c.pieces[u]; ok {
|
||||||
if v.Size > 0 {
|
if v.Size > 0 {
|
||||||
if v.Id > 0 {
|
if v.Id > 0 {
|
||||||
pieces = append(pieces, v)
|
pieces = append(pieces, v)
|
||||||
}
|
}
|
||||||
fill += v.Size
|
fill += v.Size
|
||||||
if !v.complete {
|
if !v.complete {
|
||||||
loading++
|
loading++
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user