mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-19 21:46:11 +05:00
fmt -> log
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
package memcache
|
package memcache
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"log"
|
||||||
"sort"
|
"sort"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
@@ -53,7 +53,7 @@ func NewCache(capacity int64, storage *Storage) *Cache {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (c *Cache) Init(info *metainfo.Info, hash metainfo.Hash) {
|
func (c *Cache) Init(info *metainfo.Info, hash metainfo.Hash) {
|
||||||
fmt.Println("Create cache for:", info.Name)
|
log.Println("Create cache for:", info.Name)
|
||||||
if c.capacity == 0 {
|
if c.capacity == 0 {
|
||||||
c.capacity = info.PieceLength * 6
|
c.capacity = info.PieceLength * 6
|
||||||
}
|
}
|
||||||
@@ -90,7 +90,7 @@ func (c *Cache) Piece(m metainfo.Piece) storage.PieceImpl {
|
|||||||
|
|
||||||
func (c *Cache) Close() error {
|
func (c *Cache) Close() error {
|
||||||
c.isRemove = false
|
c.isRemove = false
|
||||||
fmt.Println("Close cache for:", c.hash)
|
log.Println("Close cache for:", c.hash)
|
||||||
if _, ok := c.s.caches[c.hash]; ok {
|
if _, ok := c.s.caches[c.hash]; ok {
|
||||||
delete(c.s.caches, c.hash)
|
delete(c.s.caches, c.hash)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user