mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-19 13:36:09 +05:00
don't allow remove torrents in readOnly DB mode
This commit is contained in:
@@ -139,6 +139,9 @@ func SetTorrent(hashHex, title, poster, data string) *Torrent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func RemTorrent(hashHex string) {
|
func RemTorrent(hashHex string) {
|
||||||
|
if sets.ReadOnly {
|
||||||
|
return
|
||||||
|
}
|
||||||
hash := metainfo.NewHashFromHex(hashHex)
|
hash := metainfo.NewHashFromHex(hashHex)
|
||||||
if sets.BTsets.UseDisk && hashHex != "" && hashHex != "/" {
|
if sets.BTsets.UseDisk && hashHex != "" && hashHex != "/" {
|
||||||
name := filepath.Join(sets.BTsets.TorrentsSavePath, hashHex)
|
name := filepath.Join(sets.BTsets.TorrentsSavePath, hashHex)
|
||||||
|
|||||||
Reference in New Issue
Block a user