Mercurial > minori
annotate include/core/config.h @ 149:e41505d24733
players: filter out web browsers, they aren't even supported in animia yet
author | Paper <mrpapersonic@gmail.com> |
---|---|
date | Tue, 14 Nov 2023 13:40:11 -0500 |
parents | 6fdf0632c003 |
children | ffa535b6d630 |
rev | line source |
---|---|
9 | 1 #ifndef __core__config_h |
2 #define __core__config_h | |
85 | 3 |
9 | 4 #include "core/anime.h" |
102 | 5 #include "gui/theme.h" |
108 | 6 #include "gui/locale.h" |
147
6fdf0632c003
track: use a bit of a more sane way to manage recognition
Paper <mrpapersonic@gmail.com>
parents:
120
diff
changeset
|
7 |
6fdf0632c003
track: use a bit of a more sane way to manage recognition
Paper <mrpapersonic@gmail.com>
parents:
120
diff
changeset
|
8 #include "animia/player.h" |
6fdf0632c003
track: use a bit of a more sane way to manage recognition
Paper <mrpapersonic@gmail.com>
parents:
120
diff
changeset
|
9 |
118
39521c47c7a3
*: another huge megacommit, SORRY
Paper <mrpapersonic@gmail.com>
parents:
116
diff
changeset
|
10 #include <string> |
39521c47c7a3
*: another huge megacommit, SORRY
Paper <mrpapersonic@gmail.com>
parents:
116
diff
changeset
|
11 #include <vector> |
147
6fdf0632c003
track: use a bit of a more sane way to manage recognition
Paper <mrpapersonic@gmail.com>
parents:
120
diff
changeset
|
12 #include <utility> |
9 | 13 |
14 class Config { | |
15 public: | |
16 int Load(); | |
118
39521c47c7a3
*: another huge megacommit, SORRY
Paper <mrpapersonic@gmail.com>
parents:
116
diff
changeset
|
17 int Save() const; |
9 | 18 |
19 Anime::Services service; | |
102 | 20 Theme::Theme theme; |
108 | 21 Locale::Locale locale; |
9 | 22 |
23 struct { | |
24 public: | |
25 Anime::TitleLanguage language; | |
26 bool display_aired_episodes; | |
27 bool display_available_episodes; | |
28 bool highlight_anime_if_available; | |
29 bool highlighted_anime_above_others; | |
30 } anime_list; | |
31 | |
116
254b1d2b7096
settings: add torrents page, make rss feed configurable
Paper <mrpapersonic@gmail.com>
parents:
114
diff
changeset
|
32 /* these should preferably be in an |
254b1d2b7096
settings: add torrents page, make rss feed configurable
Paper <mrpapersonic@gmail.com>
parents:
114
diff
changeset
|
33 "auth" struct... */ |
9 | 34 struct { |
35 public: | |
120 | 36 struct { |
37 public: | |
38 std::string auth_token; | |
39 std::string username; | |
40 int user_id; | |
41 } anilist; | |
42 } auth; | |
43 | |
44 struct { | |
45 public: | |
46 bool detect_media_players; | |
149
e41505d24733
players: filter out web browsers, they aren't even supported in animia yet
Paper <mrpapersonic@gmail.com>
parents:
147
diff
changeset
|
47 /* preferably web browsers would be in a separate vector, |
e41505d24733
players: filter out web browsers, they aren't even supported in animia yet
Paper <mrpapersonic@gmail.com>
parents:
147
diff
changeset
|
48 but whatever :/ */ |
147
6fdf0632c003
track: use a bit of a more sane way to manage recognition
Paper <mrpapersonic@gmail.com>
parents:
120
diff
changeset
|
49 std::vector<std::pair<bool, animia::Player>> players; |
120 | 50 } recognition; |
116
254b1d2b7096
settings: add torrents page, make rss feed configurable
Paper <mrpapersonic@gmail.com>
parents:
114
diff
changeset
|
51 |
254b1d2b7096
settings: add torrents page, make rss feed configurable
Paper <mrpapersonic@gmail.com>
parents:
114
diff
changeset
|
52 struct { |
254b1d2b7096
settings: add torrents page, make rss feed configurable
Paper <mrpapersonic@gmail.com>
parents:
114
diff
changeset
|
53 public: |
254b1d2b7096
settings: add torrents page, make rss feed configurable
Paper <mrpapersonic@gmail.com>
parents:
114
diff
changeset
|
54 std::string feed_link; |
254b1d2b7096
settings: add torrents page, make rss feed configurable
Paper <mrpapersonic@gmail.com>
parents:
114
diff
changeset
|
55 } torrents; |
9 | 56 }; |
11 | 57 |
102 | 58 #define WIDEIFY_EX(x) L##x |
59 #define WIDEIFY(x) WIDEIFY_EX(x) | |
114
ab191e28e69d
*: add initial torrent stuff
Paper <mrpapersonic@gmail.com>
parents:
108
diff
changeset
|
60 |
116
254b1d2b7096
settings: add torrents page, make rss feed configurable
Paper <mrpapersonic@gmail.com>
parents:
114
diff
changeset
|
61 /* only on these platforms keep this uppercase. |
254b1d2b7096
settings: add torrents page, make rss feed configurable
Paper <mrpapersonic@gmail.com>
parents:
114
diff
changeset
|
62 this will not remove compatibility with older |
254b1d2b7096
settings: add torrents page, make rss feed configurable
Paper <mrpapersonic@gmail.com>
parents:
114
diff
changeset
|
63 versions, since these platforms are case insensitive |
254b1d2b7096
settings: add torrents page, make rss feed configurable
Paper <mrpapersonic@gmail.com>
parents:
114
diff
changeset
|
64 (on macOS, only by default) */ |
114
ab191e28e69d
*: add initial torrent stuff
Paper <mrpapersonic@gmail.com>
parents:
108
diff
changeset
|
65 #if (defined(WIN32) || defined(MACOSX)) |
ab191e28e69d
*: add initial torrent stuff
Paper <mrpapersonic@gmail.com>
parents:
108
diff
changeset
|
66 #define CONFIG_DIR "Minori" |
ab191e28e69d
*: add initial torrent stuff
Paper <mrpapersonic@gmail.com>
parents:
108
diff
changeset
|
67 #else |
63 | 68 #define CONFIG_DIR "minori" |
114
ab191e28e69d
*: add initial torrent stuff
Paper <mrpapersonic@gmail.com>
parents:
108
diff
changeset
|
69 #endif |
ab191e28e69d
*: add initial torrent stuff
Paper <mrpapersonic@gmail.com>
parents:
108
diff
changeset
|
70 |
102 | 71 #define CONFIG_WDIR WIDEIFY(CONFIG_DIR) |
101
c537996cf67b
*: multitude of config changes
Paper <mrpapersonic@gmail.com>
parents:
85
diff
changeset
|
72 #define CONFIG_NAME "config.ini" |
102 | 73 #define CONFIG_WNAME WIDEIFY(CONFIG_NAME) |
62 | 74 |
9 | 75 #define MAX_LINE_LENGTH 256 |
85 | 76 |
9 | 77 #endif // __core__config_h |