From 740d58bb28a81ef896027507078d3133be78852a Mon Sep 17 00:00:00 2001 From: Timon Ringwald Date: Fri, 26 Aug 2022 18:30:32 +0200 Subject: [PATCH] refactored env vars --- anilist.go | 2 +- envvars.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/anilist.go b/anilist.go index 06a0645..9fab1e1 100644 --- a/anilist.go +++ b/anilist.go @@ -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, diff --git a/envvars.go b/envvars.go index c2973d4..59c5a40 100644 --- a/envvars.go +++ b/envvars.go @@ -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)