Mercurial > minori
comparison include/core/config.h @ 258:862d0d8619f6
*: HUUUGE changes
animia has been renamed to animone, so instead of thinking of a
health condition, you think of a beautiful flower :)
I've also edited some of the code for animone, but I have no idea
if it even works or not because I don't have a mac or windows
machine lying around. whoops!
... anyway, all of the changes divergent from Anisthesia are now
licensed under BSD. it's possible that I could even rewrite most
of the code to where I don't even have to keep the MIT license,
but that's thinking too far into the future
I've been slacking off on implementing the anime seasons page,
mostly out of laziness. I think I'd have to create another db file
specifically for the seasons
anyway, this code is being pushed *primarily* because the hard drive
it's on is failing! yay :)
| author | Paper <paper@paper.us.eu.org> |
|---|---|
| date | Mon, 01 Apr 2024 02:43:44 -0400 |
| parents | c130f47f6f48 |
| children | 3ec7804abf17 |
comparison
equal
deleted
inserted
replaced
| 257:699a20c57dc8 | 258:862d0d8619f6 |
|---|---|
| 1 #ifndef __core__config_h | 1 #ifndef __core__config_h |
| 2 #define __core__config_h | 2 #define __core__config_h |
| 3 | 3 |
| 4 #include "core/anime.h" | 4 #include "core/anime.h" |
| 5 #include "gui/locale.h" | |
| 5 #include "gui/theme.h" | 6 #include "gui/theme.h" |
| 6 #include "gui/locale.h" | |
| 7 | 7 |
| 8 #include "animia/player.h" | 8 #include "animone/player.h" |
| 9 | 9 |
| 10 #include <set> | |
| 10 #include <string> | 11 #include <string> |
| 12 #include <utility> | |
| 11 #include <vector> | 13 #include <vector> |
| 12 #include <set> | |
| 13 #include <utility> | |
| 14 | 14 |
| 15 struct MediaPlayer { | 15 struct MediaPlayer { |
| 16 bool enabled = true; | 16 bool enabled = true; |
| 17 animia::Player player; | 17 animone::Player player; |
| 18 }; | 18 }; |
| 19 | 19 |
| 20 class Config { | 20 class Config { |
| 21 public: | 21 public: |
| 22 int Load(); | 22 int Load(); |
| 23 int Save(); | 23 int Save(); |
| 24 | 24 |
| 25 Anime::Services service; | 25 Anime::Services service; |
| 26 Theme::Theme theme; | 26 Theme::Theme theme; |
| 27 Locale::Locale locale; | 27 Locale::Locale locale; |
| 28 | 28 |
| 29 struct { | |
| 30 Anime::TitleLanguage language; | |
| 31 Anime::ScoreFormat score_format; | |
| 32 bool display_aired_episodes; | |
| 33 bool display_available_episodes; | |
| 34 bool highlight_anime_if_available; | |
| 35 bool highlighted_anime_above_others; | |
| 36 } anime_list; | |
| 37 | |
| 38 struct { | |
| 29 struct { | 39 struct { |
| 30 Anime::TitleLanguage language; | 40 std::string auth_token; |
| 31 Anime::ScoreFormat score_format; | 41 int user_id; |
| 32 bool display_aired_episodes; | 42 } anilist; |
| 33 bool display_available_episodes; | 43 } auth; |
| 34 bool highlight_anime_if_available; | |
| 35 bool highlighted_anime_above_others; | |
| 36 } anime_list; | |
| 37 | 44 |
| 38 struct { | 45 struct { |
| 39 struct { | 46 bool detect_media_players; |
| 40 std::string auth_token; | 47 std::vector<MediaPlayer> players; |
| 41 int user_id; | 48 } recognition; |
| 42 } anilist; | |
| 43 } auth; | |
| 44 | 49 |
| 45 struct { | 50 struct { |
| 46 bool detect_media_players; | 51 std::string feed_link; |
| 47 std::vector<MediaPlayer> players; | 52 } torrents; |
| 48 } recognition; | |
| 49 | 53 |
| 50 struct { | 54 struct { |
| 51 std::string feed_link; | 55 bool real_time_monitor; |
| 52 } torrents; | 56 std::set<std::string> paths; |
| 53 | 57 } library; |
| 54 struct { | |
| 55 bool real_time_monitor; | |
| 56 std::set<std::string> paths; | |
| 57 } library; | |
| 58 }; | 58 }; |
| 59 | 59 |
| 60 #if (defined(WIN32) || defined(MACOSX)) | 60 #if (defined(WIN32) || defined(MACOSX)) |
| 61 constexpr std::string_view CONFIG_DIR = "Minori"; | 61 constexpr std::string_view CONFIG_DIR = "Minori"; |
| 62 #else | 62 #else |
