Compare commits

...

2 Commits

Author SHA1 Message Date
1509f03681 update container registry url 2026-03-19 22:44:44 +03:00
5fda73a258 add category & savepath params for torrents 2026-03-19 22:36:52 +03:00
2 changed files with 11 additions and 3 deletions

View File

@@ -3,7 +3,7 @@ dev:
go run . go run .
build: build:
docker build -t git.zatch.ru/tsivinsky/tvqueue:latest . docker build -t git.tsivinsky.com/tsivinsky/tvqueue:latest .
push: push:
docker push git.zatch.ru/tsivinsky/tvqueue:latest docker push git.tsivinsky.com/tsivinsky/tvqueue:latest

10
main.go
View File

@@ -373,7 +373,15 @@ func main() {
return return
} }
if err := torrentClient.AddTorrentFromMemory(data, map[string]string{}); err != nil { opts := make(map[string]string)
if category, ok := os.LookupEnv("QBITTORRENT_CATEGORY"); ok {
opts["category"] = category
}
if savePath, ok := os.LookupEnv("QBITTORRENT_SAVEPATH"); ok {
opts["savepath"] = savePath
}
if err := torrentClient.AddTorrentFromMemory(data, opts); err != nil {
http.Error(w, err.Error(), 500) http.Error(w, err.Error(), 500)
return return
} }