annotate include/core/config.h @ 237:a7d0d543b334

*: make OS X builds succeed new script: deploy_build.sh, creates the app bundle
author Paper <paper@paper.us.eu.org>
date Fri, 19 Jan 2024 11:14:44 -0500
parents d030b30526d5
children c130f47f6f48
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
1 #ifndef __core__config_h
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
2 #define __core__config_h
85
c69230dc2b5d *: cleanup includes
Paper <mrpapersonic@gmail.com>
parents: 63
diff changeset
3
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
4 #include "core/anime.h"
102
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents: 101
diff changeset
5 #include "gui/theme.h"
108
2004b41d4a59 *: huge commit
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
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>
226
f784b5b1914c settings: add library page
Paper <mrpapersonic@gmail.com>
parents: 221
diff changeset
12 #include <set>
147
6fdf0632c003 track: use a bit of a more sane way to manage recognition
Paper <mrpapersonic@gmail.com>
parents: 120
diff changeset
13 #include <utility>
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
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;
ffa535b6d630 *: avoid usage of std::[pair,tuple]
Paper <mrpapersonic@gmail.com>
parents: 149
diff changeset
17 animia::Player player;
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
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
20 class Config {
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
21 public:
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
22 int Load();
118
39521c47c7a3 *: another huge megacommit, SORRY
Paper <mrpapersonic@gmail.com>
parents: 116
diff changeset
23 int Save() const;
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
24
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
25 Anime::Services service;
102
b315f3759c56 *: big patch
Paper <mrpapersonic@gmail.com>
parents: 101
diff changeset
26 Theme::Theme theme;
108
2004b41d4a59 *: huge commit
Paper <mrpapersonic@gmail.com>
parents: 102
diff changeset
27 Locale::Locale locale;
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
28
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
29 struct {
221
53211cb1e7f5 library: add initial library stuff
Paper <paper@paper.us.eu.org>
parents: 189
diff changeset
30 Anime::TitleLanguage language;
53211cb1e7f5 library: add initial library stuff
Paper <paper@paper.us.eu.org>
parents: 189
diff changeset
31 Anime::ScoreFormat score_format;
53211cb1e7f5 library: add initial library stuff
Paper <paper@paper.us.eu.org>
parents: 189
diff changeset
32 bool display_aired_episodes;
53211cb1e7f5 library: add initial library stuff
Paper <paper@paper.us.eu.org>
parents: 189
diff changeset
33 bool display_available_episodes;
53211cb1e7f5 library: add initial library stuff
Paper <paper@paper.us.eu.org>
parents: 189
diff changeset
34 bool highlight_anime_if_available;
53211cb1e7f5 library: add initial library stuff
Paper <paper@paper.us.eu.org>
parents: 189
diff changeset
35 bool highlighted_anime_above_others;
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
36 } anime_list;
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
37
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
38 struct {
221
53211cb1e7f5 library: add initial library stuff
Paper <paper@paper.us.eu.org>
parents: 189
diff changeset
39 struct {
53211cb1e7f5 library: add initial library stuff
Paper <paper@paper.us.eu.org>
parents: 189
diff changeset
40 std::string auth_token;
53211cb1e7f5 library: add initial library stuff
Paper <paper@paper.us.eu.org>
parents: 189
diff changeset
41 int user_id;
53211cb1e7f5 library: add initial library stuff
Paper <paper@paper.us.eu.org>
parents: 189
diff changeset
42 } anilist;
120
275da698697d config: template-ify INI
Paper <mrpapersonic@gmail.com>
parents: 118
diff changeset
43 } auth;
275da698697d config: template-ify INI
Paper <mrpapersonic@gmail.com>
parents: 118
diff changeset
44
275da698697d config: template-ify INI
Paper <mrpapersonic@gmail.com>
parents: 118
diff changeset
45 struct {
221
53211cb1e7f5 library: add initial library stuff
Paper <paper@paper.us.eu.org>
parents: 189
diff changeset
46 bool detect_media_players;
53211cb1e7f5 library: add initial library stuff
Paper <paper@paper.us.eu.org>
parents: 189
diff changeset
47 std::vector<MediaPlayer> players;
120
275da698697d config: template-ify INI
Paper <mrpapersonic@gmail.com>
parents: 118
diff changeset
48 } recognition;
116
254b1d2b7096 settings: add torrents page, make rss feed configurable
Paper <mrpapersonic@gmail.com>
parents: 114
diff changeset
49
254b1d2b7096 settings: add torrents page, make rss feed configurable
Paper <mrpapersonic@gmail.com>
parents: 114
diff changeset
50 struct {
221
53211cb1e7f5 library: add initial library stuff
Paper <paper@paper.us.eu.org>
parents: 189
diff changeset
51 std::string feed_link;
116
254b1d2b7096 settings: add torrents page, make rss feed configurable
Paper <mrpapersonic@gmail.com>
parents: 114
diff changeset
52 } torrents;
221
53211cb1e7f5 library: add initial library stuff
Paper <paper@paper.us.eu.org>
parents: 189
diff changeset
53
53211cb1e7f5 library: add initial library stuff
Paper <paper@paper.us.eu.org>
parents: 189
diff changeset
54 struct {
226
f784b5b1914c settings: add library page
Paper <mrpapersonic@gmail.com>
parents: 221
diff changeset
55 bool real_time_monitor;
f784b5b1914c settings: add library page
Paper <mrpapersonic@gmail.com>
parents: 221
diff changeset
56 std::set<std::string> paths;
221
53211cb1e7f5 library: add initial library stuff
Paper <paper@paper.us.eu.org>
parents: 189
diff changeset
57 } library;
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
58 };
11
fc1bf97c528b *: use C++11 standard
Paper <mrpapersonic@gmail.com>
parents: 9
diff changeset
59
114
ab191e28e69d *: add initial torrent stuff
Paper <mrpapersonic@gmail.com>
parents: 108
diff changeset
60 #if (defined(WIN32) || defined(MACOSX))
189
649786bae914 *: etc. code cleanup
Paper <mrpapersonic@gmail.com>
parents: 185
diff changeset
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
649786bae914 *: etc. code cleanup
Paper <mrpapersonic@gmail.com>
parents: 185
diff changeset
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
649786bae914 *: etc. code cleanup
Paper <mrpapersonic@gmail.com>
parents: 185
diff changeset
66 constexpr std::string_view CONFIG_NAME = "config.ini";
85
c69230dc2b5d *: cleanup includes
Paper <mrpapersonic@gmail.com>
parents: 63
diff changeset
67
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
68 #endif // __core__config_h