diff src/core/config.cpp @ 15:cde8f67a7c7d

*: update, megacommit :)
author Paper <mrpapersonic@gmail.com>
date Tue, 19 Sep 2023 22:36:08 -0400
parents fc1bf97c528b
children 327568ad9be9
line wrap: on
line diff
--- a/src/core/config.cpp	Tue Sep 19 16:33:07 2023 -0400
+++ b/src/core/config.cpp	Tue Sep 19 22:36:08 2023 -0400
@@ -13,37 +13,37 @@
 #include <limits.h>
 
 std::map<std::string, Themes> StringToTheme = {
-	{"Default", Themes::OS	  },
-	 {"Light",   Themes::LIGHT},
-	   {"Dark",	Themes::DARK }
+    {"Default", Themes::OS   },
+    {"Light",   Themes::LIGHT},
+    {"Dark",    Themes::DARK }
 };
 
 std::map<Themes, std::string> ThemeToString = {
-	{Themes::OS,	 "Default"},
-	 {Themes::LIGHT, "Light"	},
-	   {Themes::DARK,  "Dark"	}
+    {Themes::OS,    "Default"},
+    {Themes::LIGHT, "Light"  },
+    {Themes::DARK,  "Dark"   }
 };
 
 std::map<Anime::Services, std::string> ServiceToString{
-	{Anime::Services::NONE,	"None"	  },
-	 {Anime::Services::ANILIST, "AniList"}
+    {Anime::Services::NONE,    "None"   },
+    {Anime::Services::ANILIST, "AniList"}
 };
 
 std::map<std::string, Anime::Services> StringToService{
-	{"None",	 Anime::Services::NONE	  },
-	 {"AniList", Anime::Services::ANILIST}
+    {"None",    Anime::Services::NONE   },
+    {"AniList", Anime::Services::ANILIST}
 };
 
 std::map<Anime::TitleLanguage, std::string> AnimeTitleToStringMap = {
-	{Anime::TitleLanguage::ROMAJI,  "Romaji" },
-	{Anime::TitleLanguage::NATIVE,  "Native" },
-	{Anime::TitleLanguage::ENGLISH, "English"}
+    {Anime::TitleLanguage::ROMAJI,  "Romaji" },
+    {Anime::TitleLanguage::NATIVE,  "Native" },
+    {Anime::TitleLanguage::ENGLISH, "English"}
 };
 
 std::map<std::string, Anime::TitleLanguage> StringToAnimeTitleMap = {
-	{"Romaji",  Anime::TitleLanguage::ROMAJI },
-	{"Native",  Anime::TitleLanguage::NATIVE },
-	{"English", Anime::TitleLanguage::ENGLISH}
+    {"Romaji",  Anime::TitleLanguage::ROMAJI },
+    {"Native",  Anime::TitleLanguage::NATIVE },
+    {"English", Anime::TitleLanguage::ENGLISH}
 };
 
 int Config::Load() {
@@ -54,15 +54,15 @@
 	auto config_js = nlohmann::json::parse(config);
 	service = StringToService[JSON::GetString(config_js, "/General/Service"_json_pointer)];
 	anime_list.language = StringToAnimeTitleMap[JSON::GetString(
-		config_js, "/Anime List/Display only aired episodes"_json_pointer, "Romaji")];
+	    config_js, "/Anime List/Display only aired episodes"_json_pointer, "Romaji")];
 	anime_list.display_aired_episodes =
-		JSON::GetBoolean(config_js, "/Anime List/Display only aired episodes"_json_pointer, true);
+	    JSON::GetBoolean(config_js, "/Anime List/Display only aired episodes"_json_pointer, true);
 	anime_list.display_available_episodes =
-		JSON::GetBoolean(config_js, "/Anime List/Display only available episodes in library"_json_pointer, true);
+	    JSON::GetBoolean(config_js, "/Anime List/Display only available episodes in library"_json_pointer, true);
 	anime_list.highlight_anime_if_available =
-		JSON::GetBoolean(config_js, "/Anime List/Highlight anime if available"_json_pointer, true);
+	    JSON::GetBoolean(config_js, "/Anime List/Highlight anime if available"_json_pointer, true);
 	anime_list.highlighted_anime_above_others =
-		JSON::GetBoolean(config_js, "/Anime List/Display highlighted anime above others"_json_pointer);
+	    JSON::GetBoolean(config_js, "/Anime List/Display highlighted anime above others"_json_pointer);
 	anilist.auth_token = JSON::GetString(config_js, "/Authorization/AniList/Auth Token"_json_pointer);
 	anilist.username = JSON::GetString(config_js, "/Authorization/AniList/Username"_json_pointer);
 	anilist.user_id = JSON::GetInt(config_js, "/Authorization/AniList/User ID"_json_pointer);