2022-08-25 09:04:22 +02:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"html/template"
|
|
|
|
"time"
|
|
|
|
|
2022-08-25 10:26:57 +02:00
|
|
|
"git.milar.in/milarin/envvars/v2"
|
2022-08-25 09:04:22 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
2022-08-26 18:27:54 +02:00
|
|
|
PollRate = envvars.Object("POLL_RATE", 30*time.Minute, time.ParseDuration)
|
2022-08-25 09:04:22 +02:00
|
|
|
|
|
|
|
TorrentPath = envvars.String("TORRENT_PATH", "")
|
|
|
|
|
2022-08-25 23:25:48 +02:00
|
|
|
DebugAnimeEpisodePattern = envvars.Object(
|
|
|
|
"DEBUG_ANIME_LANGUAGE_PATTERN",
|
|
|
|
template.Must(template.New("anime-episode-filepath-pattern").Parse(`{{.Title.UserPreferred}} episode {{.Episode}}`)),
|
|
|
|
template.New("anime-episode-pattern").Parse,
|
|
|
|
)
|
|
|
|
|
|
|
|
DownloadAll = envvars.Bool("DOWNLOAD_ALL_ANIMES", false)
|
2022-08-25 09:04:22 +02:00
|
|
|
)
|