mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-19 21:46:11 +05:00
fix api docs and cosmetics
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) { // NE
|
||||
// return s.capacity, true // NE
|
||||
// } // NE
|
||||
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 ch, nil // OE
|
||||
// return ts.TorrentImpl{ // NE
|
||||
// Piece: ch.Piece, // NE
|
||||
// Close: ch.Close, // NE
|
||||
// Capacity: &capFunc, // NE
|
||||
// }, nil // NE
|
||||
}
|
||||
|
||||
func (s *Storage) CloseHash(hash metainfo.Hash) {
|
||||
|
||||
Reference in New Issue
Block a user