mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-20 22:16:09 +05:00
update
This commit is contained in:
21
server/tgbot/delete.go
Normal file
21
server/tgbot/delete.go
Normal file
@@ -0,0 +1,21 @@
|
||||
package tgbot
|
||||
|
||||
import (
|
||||
tele "gopkg.in/telebot.v4"
|
||||
"server/torr"
|
||||
)
|
||||
|
||||
func deleteTorrent(c tele.Context) {
|
||||
args := c.Args()
|
||||
hash := args[1]
|
||||
torr.RemTorrent(hash)
|
||||
return
|
||||
}
|
||||
|
||||
func clear(c tele.Context) error {
|
||||
torrents := torr.ListTorrent()
|
||||
for _, t := range torrents {
|
||||
torr.RemTorrent(t.TorrentSpec.InfoHash.HexString())
|
||||
}
|
||||
return nil
|
||||
}
|
||||
Reference in New Issue
Block a user