Mercurial > minori
annotate 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 |
| rev | line source |
|---|---|
| 9 | 1 #ifndef __core__config_h |
| 2 #define __core__config_h | |
| 85 | 3 |
| 9 | 4 #include "core/anime.h" |
| 258 | 5 #include "gui/locale.h" |
| 102 | 6 #include "gui/theme.h" |
|
147
6fdf0632c003
track: use a bit of a more sane way to manage recognition
Paper <mrpapersonic@gmail.com>
parents:
120
diff
changeset
|
7 |
| 258 | 8 #include "animone/player.h" |
|
147
6fdf0632c003
track: use a bit of a more sane way to manage recognition
Paper <mrpapersonic@gmail.com>
parents:
120
diff
changeset
|
9 |
| 258 | 10 #include <set> |
|
118
39521c47c7a3
*: another huge megacommit, SORRY
Paper <mrpapersonic@gmail.com>
parents:
116
diff
changeset
|
11 #include <string> |
| 258 | 12 #include <utility> |
|
118
39521c47c7a3
*: another huge megacommit, SORRY
Paper <mrpapersonic@gmail.com>
parents:
116
diff
changeset
|
13 #include <vector> |
| 9 | 14 |
|
150
ffa535b6d630
*: avoid usage of std::[pair,tuple]
Paper <mrpapersonic@gmail.com>
parents:
149
diff
changeset
|
15 struct MediaPlayer { |
|
ffa535b6d630
*: avoid usage of std::[pair,tuple]
Paper <mrpapersonic@gmail.com>
parents:
149
diff
changeset
|
16 bool enabled = true; |
| 258 | 17 animone::Player player; |
|
150
ffa535b6d630
*: avoid usage of std::[pair,tuple]
Paper <mrpapersonic@gmail.com>
parents:
149
diff
changeset
|
18 }; |
|
ffa535b6d630
*: avoid usage of std::[pair,tuple]
Paper <mrpapersonic@gmail.com>
parents:
149
diff
changeset
|
19 |
| 9 | 20 class Config { |
| 258 | 21 public: |
| 22 int Load(); | |
| 23 int Save(); | |
| 9 | 24 |
| 258 | 25 Anime::Services service; |
| 26 Theme::Theme theme; | |
| 27 Locale::Locale locale; | |
| 9 | 28 |
| 258 | 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; | |
| 9 | 37 |
| 258 | 38 struct { |
| 9 | 39 struct { |
| 258 | 40 std::string auth_token; |
| 41 int user_id; | |
| 42 } anilist; | |
| 43 } auth; | |
| 120 | 44 |
| 258 | 45 struct { |
| 46 bool detect_media_players; | |
| 47 std::vector<MediaPlayer> players; | |
| 48 } recognition; | |
|
116
254b1d2b7096
settings: add torrents page, make rss feed configurable
Paper <mrpapersonic@gmail.com>
parents:
114
diff
changeset
|
49 |
| 258 | 50 struct { |
| 51 std::string feed_link; | |
| 52 } torrents; | |
|
221
53211cb1e7f5
library: add initial library stuff
Paper <paper@paper.us.eu.org>
parents:
189
diff
changeset
|
53 |
| 258 | 54 struct { |
| 55 bool real_time_monitor; | |
| 56 std::set<std::string> paths; | |
| 57 } library; | |
| 9 | 58 }; |
| 11 | 59 |
|
114
ab191e28e69d
*: add initial torrent stuff
Paper <mrpapersonic@gmail.com>
parents:
108
diff
changeset
|
60 #if (defined(WIN32) || defined(MACOSX)) |
| 189 | 61 constexpr std::string_view CONFIG_DIR = "Minori"; |
|
114
ab191e28e69d
*: add initial torrent stuff
Paper <mrpapersonic@gmail.com>
parents:
108
diff
changeset
|
62 #else |
| 189 | 63 constexpr std::string_view CONFIG_DIR = "minori"; |
|
114
ab191e28e69d
*: add initial torrent stuff
Paper <mrpapersonic@gmail.com>
parents:
108
diff
changeset
|
64 #endif |
|
ab191e28e69d
*: add initial torrent stuff
Paper <mrpapersonic@gmail.com>
parents:
108
diff
changeset
|
65 |
| 189 | 66 constexpr std::string_view CONFIG_NAME = "config.ini"; |
| 85 | 67 |
| 9 | 68 #endif // __core__config_h |
