mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-19 13:36:09 +05:00
update static web and fix merge
This commit is contained in:
@@ -25,20 +25,20 @@ func NewStorage(capacity int64) *Storage {
|
||||
}
|
||||
|
||||
func (s *Storage) OpenTorrent(info *metainfo.Info, infoHash metainfo.Hash) (ts.TorrentImpl, error) {
|
||||
capFunc := func() (int64, bool) {
|
||||
return s.capacity, true
|
||||
}
|
||||
// capFunc := func() (int64, bool) {
|
||||
// return s.capacity, true
|
||||
// }
|
||||
s.mu.Lock()
|
||||
defer s.mu.Unlock()
|
||||
ch := NewCache(s.capacity, s)
|
||||
ch.Init(info, infoHash)
|
||||
s.caches[infoHash] = ch
|
||||
return ch, nil
|
||||
// return ts.TorrentImpl{
|
||||
// Piece: ch.Piece,
|
||||
// Close: ch.Close,
|
||||
// Capacity: &capFunc,
|
||||
// }, nil
|
||||
// return ts.TorrentImpl{
|
||||
// Piece: ch.Piece,
|
||||
// Close: ch.Close,
|
||||
// Capacity: &capFunc,
|
||||
// }, nil
|
||||
}
|
||||
|
||||
func (s *Storage) CloseHash(hash metainfo.Hash) {
|
||||
|
||||
Reference in New Issue
Block a user