mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-19 21:46:11 +05:00
add get cache func
This commit is contained in:
@@ -44,6 +44,15 @@ func (s *Storage) GetStats(hash metainfo.Hash) *state.CacheState {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s *Storage) GetCache(hash metainfo.Hash) interface{} {
|
||||||
|
s.mu.Lock()
|
||||||
|
defer s.mu.Unlock()
|
||||||
|
if c, ok := s.caches[hash]; ok {
|
||||||
|
return c
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
func (s *Storage) CloseHash(hash metainfo.Hash) {
|
func (s *Storage) CloseHash(hash metainfo.Hash) {
|
||||||
if s.caches == nil {
|
if s.caches == nil {
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user