mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-20 14:06:09 +05:00
22 lines
344 B
Go
22 lines
344 B
Go
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
|
|
}
|