comparison src/core/config.cc @ 317:b1f4d1867ab1

services: VERY initial Kitsu support it only supports user authentication for now, but it's definitely a start.
author Paper <paper@paper.us.eu.org>
date Wed, 12 Jun 2024 04:07:10 -0400
parents 53e3c015a973
children 3b355fa948c7
comparison
equal deleted inserted replaced
316:180714442770 317:b1f4d1867ab1
57 else 57 else
58 anime_list.highlighted_anime_above_others = false; 58 anime_list.highlighted_anime_above_others = false;
59 59
60 auth.anilist.auth_token = INI::GetIniString(ini, "Authentication/AniList", "Auth Token", ""); 60 auth.anilist.auth_token = INI::GetIniString(ini, "Authentication/AniList", "Auth Token", "");
61 auth.anilist.user_id = INI::GetIniInteger<int>(ini, "Authentication/AniList", "User ID", 0); 61 auth.anilist.user_id = INI::GetIniInteger<int>(ini, "Authentication/AniList", "User ID", 0);
62
63 auth.kitsu.access_token = INI::GetIniString(ini, "Authentication/Kitsu", "Access Token", "");
64 auth.kitsu.access_token_expiration = INI::GetIniInteger<Time::Timestamp>(ini, "Authentication/Kitsu", "Access Token Expiration", 0);
65 auth.kitsu.refresh_token = INI::GetIniString(ini, "Authentication/Kitsu", "Refresh Token", "");
66 auth.kitsu.user_id = INI::GetIniString(ini, "Authentication/Kitsu", "User ID", "");
62 67
63 torrents.feed_link = INI::GetIniString(ini, "Torrents", "RSS feed", 68 torrents.feed_link = INI::GetIniString(ini, "Torrents", "RSS feed",
64 "https://www.tokyotosho.info/rss.php?filter=1,11&zwnj=0"); 69 "https://www.tokyotosho.info/rss.php?filter=1,11&zwnj=0");
65 70
66 recognition.detect_media_players = INI::GetIniBool(ini, "Recognition", "Detect media players", true); 71 recognition.detect_media_players = INI::GetIniBool(ini, "Recognition", "Detect media players", true);
133 ini["Anime List"]["Display highlighted anime above others"] = Strings::ToUtf8String(anime_list.highlighted_anime_above_others); 138 ini["Anime List"]["Display highlighted anime above others"] = Strings::ToUtf8String(anime_list.highlighted_anime_above_others);
134 139
135 ini["Authentication/AniList"]["Auth Token"] = auth.anilist.auth_token; 140 ini["Authentication/AniList"]["Auth Token"] = auth.anilist.auth_token;
136 ini["Authentication/AniList"]["User ID"] = Strings::ToUtf8String(auth.anilist.user_id); 141 ini["Authentication/AniList"]["User ID"] = Strings::ToUtf8String(auth.anilist.user_id);
137 142
143 ini["Authentication/Kitsu"]["Access Token"] = auth.kitsu.access_token;
144 ini["Authentication/Kitsu"]["Access Token Expiration"] = Strings::ToUtf8String(auth.kitsu.access_token_expiration);
145 ini["Authentication/Kitsu"]["Refresh Token"] = auth.kitsu.refresh_token;
146 ini["Authentication/Kitsu"]["User ID"] = auth.kitsu.user_id;
147
138 ini["Appearance"]["Theme"] = Translate::ToString(theme.GetTheme()); 148 ini["Appearance"]["Theme"] = Translate::ToString(theme.GetTheme());
139 149
140 ini["Torrents"]["RSS feed"] = torrents.feed_link; 150 ini["Torrents"]["RSS feed"] = torrents.feed_link;
141 151
142 ini["Recognition"]["Detect media players"] = Strings::ToUtf8String(recognition.detect_media_players); 152 ini["Recognition"]["Detect media players"] = Strings::ToUtf8String(recognition.detect_media_players);