diff src/core/config.cc @ 320:1b5c04268d6a

services/kitsu: ACTUALLY finish GetAnimeList there are some things the API just... doesn't provide. therefore we have to request the genres separately any time a new anime info box is opened...
author Paper <paper@paper.us.eu.org>
date Wed, 12 Jun 2024 19:49:19 -0400
parents 3b355fa948c7
children a7d4e5107531
line wrap: on
line diff
--- a/src/core/config.cc	Wed Jun 12 17:52:26 2024 -0400
+++ b/src/core/config.cc	Wed Jun 12 19:49:19 2024 -0400
@@ -48,19 +48,19 @@
 
 	anime_list.score_format = Translate::ToScoreFormat(toml::find_or(data, "Anime List", "Score format", "100-point"));
 	anime_list.language = Translate::ToLanguage(toml::find_or(data, "Anime List", "Title language", "Romaji"));
-	anime_list.display_aired_episodes = toml::find_or<bool>(data, "Anime List", "Display only aired episodes", true);
-	anime_list.display_available_episodes = toml::find_or<bool>(data, "Anime List", "Display only available episodes in library", true);
-	anime_list.highlight_anime_if_available = toml::find_or<bool>(data, "Anime List", "Highlight anime if available", true);
+	anime_list.display_aired_episodes = toml::find_or(data, "Anime List", "Display only aired episodes", true);
+	anime_list.display_available_episodes = toml::find_or(data, "Anime List", "Display only available episodes in library", true);
+	anime_list.highlight_anime_if_available = toml::find_or(data, "Anime List", "Highlight anime if available", true);
 	anime_list.highlighted_anime_above_others =
 		(anime_list.highlight_anime_if_available)
-		? toml::find_or<bool>(data, "Anime List", "Display highlighted anime above others", false)
+		? toml::find_or(data, "Anime List", "Display highlighted anime above others", false)
 		: false;
 
 	auth.anilist.auth_token = toml::find_or(data, "Authentication/AniList", "Auth Token", "");
-	auth.anilist.user_id = toml::find_or<int>(data, "Authentication/AniList", "User ID", 0);
+	auth.anilist.user_id = toml::find_or(data, "Authentication/AniList", "User ID", 0);
 
 	auth.kitsu.access_token = toml::find_or(data, "Authentication/Kitsu", "Access Token", "");
-	auth.kitsu.access_token_expiration = toml::find_or(data, "Authentication/Kitsu", "Access Token Expiration", 0LL);
+	auth.kitsu.access_token_expiration = toml::find_or(data, "Authentication/Kitsu", "Access Token Expiration", static_cast<Time::Timestamp>(0));
 	auth.kitsu.refresh_token = toml::find_or(data, "Authentication/Kitsu", "Refresh Token", "");
 	auth.kitsu.user_id = toml::find_or(data, "Authentication/Kitsu", "User ID", "");
 
@@ -90,10 +90,10 @@
 		switch (player.type) {
 			default:
 			case animone::PlayerType::Default:
-				enabled = toml::find_or<bool>(data, "Recognition/Players", player.name, true);
+				enabled = toml::find_or(data, "Recognition/Players", player.name, true);
 				break;
 			case animone::PlayerType::WebBrowser:
-				enabled = toml::find_or<bool>(data, "Recognition/Browsers", player.name, true);
+				enabled = toml::find_or(data, "Recognition/Browsers", player.name, true);
 				break;
 		}
 	}