mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-19 13:36:09 +05:00
@@ -15,7 +15,7 @@ func Preconfig(dkill bool) {
|
||||
signal.Notify(sigc,
|
||||
syscall.SIGHUP,
|
||||
syscall.SIGINT,
|
||||
syscall.SIGSTOP,
|
||||
|
||||
syscall.SIGPIPE,
|
||||
syscall.SIGTERM,
|
||||
syscall.SIGQUIT)
|
||||
|
||||
@@ -4,8 +4,9 @@ import (
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
bolt "go.etcd.io/bbolt"
|
||||
"server/log"
|
||||
|
||||
bolt "go.etcd.io/bbolt"
|
||||
)
|
||||
|
||||
type TDB struct {
|
||||
@@ -99,7 +100,6 @@ func (v *TDB) Set(xpath, name string, value []byte) {
|
||||
log.TLogln("value:", value)
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func (v *TDB) List(xpath string) []string {
|
||||
@@ -173,5 +173,4 @@ func (v *TDB) Rem(xpath, name string) {
|
||||
log.TLogln("Error rem sets", xpath+"/"+name, ", error:", err)
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
@@ -82,9 +82,7 @@ func (c *Cache) Piece(m metainfo.Piece) storage.PieceImpl {
|
||||
|
||||
func (c *Cache) Close() error {
|
||||
log.TLogln("Close cache for:", c.hash)
|
||||
if _, ok := c.storage.caches[c.hash]; ok {
|
||||
delete(c.storage.caches, c.hash)
|
||||
}
|
||||
delete(c.storage.caches, c.hash)
|
||||
c.pieces = nil
|
||||
|
||||
c.muReaders.Lock()
|
||||
|
||||
@@ -359,9 +359,7 @@ func (t *Torrent) Close() {
|
||||
t.Stat = state.TorrentClosed
|
||||
|
||||
t.bt.mu.Lock()
|
||||
if _, ok := t.bt.torrents[t.Hash()]; ok {
|
||||
delete(t.bt.torrents, t.Hash())
|
||||
}
|
||||
delete(t.bt.torrents, t.Hash())
|
||||
t.bt.mu.Unlock()
|
||||
|
||||
t.drop()
|
||||
|
||||
@@ -211,5 +211,5 @@ func streamNoAuth(c *gin.Context) {
|
||||
}
|
||||
c.Header("WWW-Authenticate", "Basic realm=Authorization Required")
|
||||
c.AbortWithStatus(http.StatusUnauthorized)
|
||||
return
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user