Add context.TODO() to torrent-get functions

This commit is contained in:
Jeffrey Serio 2023-07-19 17:01:54 -05:00
parent 7ef4dde3b1
commit 50115dc2de
2 changed files with 6 additions and 4 deletions

View File

@ -1,6 +1,7 @@
package main
import (
"context"
"fmt"
"html/template"
"log"
@ -90,7 +91,7 @@ func main() {
log.Fatalln(err)
}
stats, err := transmissionbt.SessionStats()
stats, err := transmissionbt.SessionStats(context.TODO())
if err != nil {
log.Fatalln(err)
}
@ -125,7 +126,7 @@ func main() {
seederCount int64
)
torrents, err := transmissionbt.TorrentGet([]string{"name", "activityDate", "totalSize", "trackerStats"}, nil)
torrents, err := transmissionbt.TorrentGet(context.TODO(), []string{"name", "activityDate", "totalSize", "trackerStats"}, nil)
if err != nil {
fmt.Fprintln(os.Stderr, err)
} else {

View File

@ -1,6 +1,7 @@
package main
import (
"context"
"fmt"
"log"
"os"
@ -92,7 +93,7 @@ func main() {
log.Fatalln(err)
}
stats, err := transmissionbt.SessionStats()
stats, err := transmissionbt.SessionStats(context.TODO())
if err != nil {
log.Fatalln(err)
}
@ -140,7 +141,7 @@ func main() {
)
fmt.Println("TORRENT STATS")
torrents, err := transmissionbt.TorrentGet([]string{
torrents, err := transmissionbt.TorrentGet(context.TODO(), []string{
"activityDate",
"name",
"totalSize",