Mercurial > minori
comparison src/core/config.cc @ 413:192da585a0a8 default tip
*: fix formatting
the clang-format file was broken andjust using LLVM defaults.
now it's fixed and is more in line with what I actually prefer my
code to look like -- esp. with regards to tabulators
| author | Paper <paper@tflc.us> |
|---|---|
| date | Sat, 25 Jul 2026 14:54:32 -0400 |
| parents | 963047512d34 |
| children |
comparison
equal
deleted
inserted
replaced
| 412:05aed03e0111 | 413:192da585a0a8 |
|---|---|
| 48 | 48 |
| 49 anime_list.score_format = Translate::ToScoreFormat(toml::find_or(data, "Anime List", "Score format", "100-point")); | 49 anime_list.score_format = Translate::ToScoreFormat(toml::find_or(data, "Anime List", "Score format", "100-point")); |
| 50 anime_list.language = Translate::ToLanguage(toml::find_or(data, "Anime List", "Title language", "Romaji")); | 50 anime_list.language = Translate::ToLanguage(toml::find_or(data, "Anime List", "Title language", "Romaji")); |
| 51 anime_list.display_aired_episodes = toml::find_or(data, "Anime List", "Display only aired episodes", true); | 51 anime_list.display_aired_episodes = toml::find_or(data, "Anime List", "Display only aired episodes", true); |
| 52 anime_list.display_available_episodes = | 52 anime_list.display_available_episodes = |
| 53 toml::find_or(data, "Anime List", "Display only available episodes in library", true); | 53 toml::find_or(data, "Anime List", "Display only available episodes in library", true); |
| 54 anime_list.highlight_anime_if_available = toml::find_or(data, "Anime List", "Highlight anime if available", true); | 54 anime_list.highlight_anime_if_available = toml::find_or(data, "Anime List", "Highlight anime if available", true); |
| 55 anime_list.highlighted_anime_above_others = | 55 anime_list.highlighted_anime_above_others = |
| 56 (anime_list.highlight_anime_if_available) | 56 (anime_list.highlight_anime_if_available) |
| 57 ? toml::find_or(data, "Anime List", "Display highlighted anime above others", false) | 57 ? toml::find_or(data, "Anime List", "Display highlighted anime above others", false) |
| 58 : false; | 58 : false; |
| 59 | 59 |
| 60 auth.anilist.auth_token = toml::find_or(data, "Authentication/AniList", "Auth Token", ""); | 60 auth.anilist.auth_token = toml::find_or(data, "Authentication/AniList", "Auth Token", ""); |
| 61 auth.anilist.user_id = toml::find_or(data, "Authentication/AniList", "User ID", 0); | 61 auth.anilist.user_id = toml::find_or(data, "Authentication/AniList", "User ID", 0); |
| 62 | 62 |
| 63 auth.kitsu.access_token = toml::find_or(data, "Authentication/Kitsu", "Access Token", ""); | 63 auth.kitsu.access_token = toml::find_or(data, "Authentication/Kitsu", "Access Token", ""); |
| 64 auth.kitsu.access_token_expiration = | 64 auth.kitsu.access_token_expiration = |
| 65 toml::find_or(data, "Authentication/Kitsu", "Access Token Expiration", static_cast<Time::Timestamp>(0)); | 65 toml::find_or(data, "Authentication/Kitsu", "Access Token Expiration", static_cast<Time::Timestamp>(0)); |
| 66 auth.kitsu.refresh_token = toml::find_or(data, "Authentication/Kitsu", "Refresh Token", ""); | 66 auth.kitsu.refresh_token = toml::find_or(data, "Authentication/Kitsu", "Refresh Token", ""); |
| 67 auth.kitsu.user_id = toml::find_or(data, "Authentication/Kitsu", "User ID", ""); | 67 auth.kitsu.user_id = toml::find_or(data, "Authentication/Kitsu", "User ID", ""); |
| 68 | 68 |
| 69 torrents.feed_link = | 69 torrents.feed_link = |
| 70 toml::find_or(data, "Torrents", "RSS feed", "https://www.tokyotosho.info/rss.php?filter=1,11&zwnj=0"); | 70 toml::find_or(data, "Torrents", "RSS feed", "https://www.tokyotosho.info/rss.php?filter=1,11&zwnj=0"); |
| 71 | 71 |
| 72 recognition.detect_media_players = toml::find_or(data, "Recognition", "Detect media players", true); | 72 recognition.detect_media_players = toml::find_or(data, "Recognition", "Detect media players", true); |
| 73 | 73 |
| 74 { | 74 { |
| 75 QFile f(":/players.animone"); | 75 QFile f(":/players.animone"); |
| 130 data["Library"]["Folders"] = library.paths; | 130 data["Library"]["Folders"] = library.paths; |
| 131 data["Library"]["Real-time monitor"] = library.real_time_monitor; | 131 data["Library"]["Real-time monitor"] = library.real_time_monitor; |
| 132 | 132 |
| 133 for (const auto &[enabled, player] : recognition.players) { | 133 for (const auto &[enabled, player] : recognition.players) { |
| 134 const std::string section = | 134 const std::string section = |
| 135 (player.type == animone::PlayerType::WebBrowser) ? "Recognition/Players" : "Recognition/Browsers"; | 135 (player.type == animone::PlayerType::WebBrowser) ? "Recognition/Players" : "Recognition/Browsers"; |
| 136 data[section][player.name] = enabled; | 136 data[section][player.name] = enabled; |
| 137 } | 137 } |
| 138 | 138 |
| 139 data["Recognition"]["Detect media players"] = recognition.detect_media_players; | 139 data["Recognition"]["Detect media players"] = recognition.detect_media_players; |
| 140 | 140 |
