Compare commits
2 Commits
b92a1216f0
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 1509f03681 | |||
| 5fda73a258 |
4
Justfile
4
Justfile
@@ -3,7 +3,7 @@ dev:
|
||||
go run .
|
||||
|
||||
build:
|
||||
docker build -t git.zatch.ru/tsivinsky/tvqueue:latest .
|
||||
docker build -t git.tsivinsky.com/tsivinsky/tvqueue:latest .
|
||||
|
||||
push:
|
||||
docker push git.zatch.ru/tsivinsky/tvqueue:latest
|
||||
docker push git.tsivinsky.com/tsivinsky/tvqueue:latest
|
||||
|
||||
10
main.go
10
main.go
@@ -373,7 +373,15 @@ func main() {
|
||||
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)
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user