2022-08-15 15:55:27 +02:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"time"
|
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
2022-08-25 18:13:29 +02:00
|
|
|
fmt.Println("generated priority values:")
|
|
|
|
fmt.Print(Map2Table("language", PreferredLanguages))
|
|
|
|
fmt.Print(Map2Table("subtitle", PreferredSubtitles))
|
|
|
|
fmt.Print(Map2Table("resolution", PreferredResolutions))
|
|
|
|
fmt.Println()
|
2022-08-21 21:14:44 +02:00
|
|
|
|
2022-08-15 15:55:27 +02:00
|
|
|
// get access token once at startup to be sure that an access token is obtainable at all
|
|
|
|
if _, err := GetAnilistAccessToken(); err != nil {
|
|
|
|
panic(err)
|
|
|
|
}
|
|
|
|
|
|
|
|
ticker := time.NewTicker(PollRate)
|
|
|
|
defer ticker.Stop()
|
|
|
|
|
|
|
|
checkTorrents()
|
|
|
|
for range ticker.C {
|
|
|
|
checkTorrents()
|
|
|
|
}
|
|
|
|
}
|