refactored env vars
This commit is contained in:
parent
0574e3ec2f
commit
740d58bb28
@ -28,7 +28,7 @@ func GetCurrentlyWatchingAnimes() (<-chan *anilist.MediaList, error) {
|
||||
return nil, ErrAnimeListNotObtainable.Wrap(err, "access token acquisition failed")
|
||||
}
|
||||
|
||||
media := channel.Map(channel.Of(AnimeStatus...), func(status anilist.MediaListStatus) <-chan *anilist.MediaList {
|
||||
media := channel.Map(channel.Of(AnimeStatuses...), func(status anilist.MediaListStatus) <-chan *anilist.MediaList {
|
||||
return anilist.NewApi(token).GetMediaList(context.Background(), anilist.MediaListQuery{
|
||||
UserName: AnilistUsername,
|
||||
Type: anilist.MediaTypeAnime,
|
||||
|
@ -17,8 +17,8 @@ var (
|
||||
AnilistAccessToken = envvars.String("ANILIST_TOKEN", "")
|
||||
|
||||
StoragePath = envvars.String("STORAGE_PATH", "")
|
||||
StorageUser = envvars.String("STORAGE_USER", "")
|
||||
StoragePass = envvars.String("STORAGE_PASS", "")
|
||||
StorageUser = envvars.String("STORAGE_USERNAME", "")
|
||||
StoragePass = envvars.String("STORAGE_PASSWORD", "")
|
||||
|
||||
TorrentPath = envvars.String("TORRENT_PATH", "")
|
||||
AnimePath = envvars.String("ANIME_PATH", "")
|
||||
@ -35,7 +35,7 @@ var (
|
||||
template.New("anime-episode-pattern").Parse,
|
||||
)
|
||||
|
||||
AnimeStatus = envvars.ObjectSlice("ANIME_STATUS", ",", []anilist.MediaListStatus{
|
||||
AnimeStatuses = envvars.ObjectSlice("ANIME_STATUSES", ",", []anilist.MediaListStatus{
|
||||
anilist.MediaListStatusCurrent,
|
||||
anilist.MediaListStatusPlanning,
|
||||
}, ParseMediaListStatus)
|
||||
|
Loading…
Reference in New Issue
Block a user