annotate include/core/anime.h @ 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 47c9f8502269
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
261
3ec7804abf17 include: make header guards more sane
Paper <paper@paper.us.eu.org>
parents: 260
diff changeset
1 #ifndef MINORI_CORE_ANIME_H_
3ec7804abf17 include: make header guards more sane
Paper <paper@paper.us.eu.org>
parents: 260
diff changeset
2 #define MINORI_CORE_ANIME_H_
3ec7804abf17 include: make header guards more sane
Paper <paper@paper.us.eu.org>
parents: 260
diff changeset
3
327
b5d6c27c308f anime: refactor Anime::SeriesSeason to Season class
Paper <paper@paper.us.eu.org>
parents: 324
diff changeset
4 #include "core/anime_season.h"
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
5 #include "core/date.h"
327
b5d6c27c308f anime: refactor Anime::SeriesSeason to Season class
Paper <paper@paper.us.eu.org>
parents: 324
diff changeset
6
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
7 #include <array>
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
8 #include <map>
369
47c9f8502269 *: clang-format all the things
Paper <paper@tflc.us>
parents: 327
diff changeset
9 #include <optional>
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
10 #include <vector>
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
11
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
12 namespace Anime {
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
13
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
14 enum class ListStatus {
279
657fda1b9cac *: clean up enums
Paper <paper@paper.us.eu.org>
parents: 264
diff changeset
15 NotInList = 0,
657fda1b9cac *: clean up enums
Paper <paper@paper.us.eu.org>
parents: 264
diff changeset
16 Current,
657fda1b9cac *: clean up enums
Paper <paper@paper.us.eu.org>
parents: 264
diff changeset
17 Completed,
657fda1b9cac *: clean up enums
Paper <paper@paper.us.eu.org>
parents: 264
diff changeset
18 Paused,
657fda1b9cac *: clean up enums
Paper <paper@paper.us.eu.org>
parents: 264
diff changeset
19 Dropped,
369
47c9f8502269 *: clang-format all the things
Paper <paper@tflc.us>
parents: 327
diff changeset
20 Planning,
279
657fda1b9cac *: clean up enums
Paper <paper@paper.us.eu.org>
parents: 264
diff changeset
21 };
657fda1b9cac *: clean up enums
Paper <paper@paper.us.eu.org>
parents: 264
diff changeset
22
657fda1b9cac *: clean up enums
Paper <paper@paper.us.eu.org>
parents: 264
diff changeset
23 constexpr std::array<ListStatus, 5> ListStatuses{
413
192da585a0a8 *: fix formatting
Paper <paper@tflc.us>
parents: 369
diff changeset
24 ListStatus::Current,
192da585a0a8 *: fix formatting
Paper <paper@tflc.us>
parents: 369
diff changeset
25 ListStatus::Completed,
192da585a0a8 *: fix formatting
Paper <paper@tflc.us>
parents: 369
diff changeset
26 ListStatus::Paused,
192da585a0a8 *: fix formatting
Paper <paper@tflc.us>
parents: 369
diff changeset
27 ListStatus::Dropped,
192da585a0a8 *: fix formatting
Paper <paper@tflc.us>
parents: 369
diff changeset
28 ListStatus::Planning,
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
29 };
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
30
279
657fda1b9cac *: clean up enums
Paper <paper@paper.us.eu.org>
parents: 264
diff changeset
31 enum class SeriesStatus {
657fda1b9cac *: clean up enums
Paper <paper@paper.us.eu.org>
parents: 264
diff changeset
32 Unknown = 0,
657fda1b9cac *: clean up enums
Paper <paper@paper.us.eu.org>
parents: 264
diff changeset
33 Finished,
657fda1b9cac *: clean up enums
Paper <paper@paper.us.eu.org>
parents: 264
diff changeset
34 Releasing,
657fda1b9cac *: clean up enums
Paper <paper@paper.us.eu.org>
parents: 264
diff changeset
35 NotYetReleased,
657fda1b9cac *: clean up enums
Paper <paper@paper.us.eu.org>
parents: 264
diff changeset
36 Cancelled,
369
47c9f8502269 *: clang-format all the things
Paper <paper@tflc.us>
parents: 327
diff changeset
37 Hiatus,
279
657fda1b9cac *: clean up enums
Paper <paper@paper.us.eu.org>
parents: 264
diff changeset
38 };
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
39
279
657fda1b9cac *: clean up enums
Paper <paper@paper.us.eu.org>
parents: 264
diff changeset
40 constexpr std::array<SeriesStatus, 6> SeriesStatuses{
413
192da585a0a8 *: fix formatting
Paper <paper@tflc.us>
parents: 369
diff changeset
41 SeriesStatus::Unknown,
192da585a0a8 *: fix formatting
Paper <paper@tflc.us>
parents: 369
diff changeset
42 SeriesStatus::Finished,
192da585a0a8 *: fix formatting
Paper <paper@tflc.us>
parents: 369
diff changeset
43 SeriesStatus::Releasing,
192da585a0a8 *: fix formatting
Paper <paper@tflc.us>
parents: 369
diff changeset
44 SeriesStatus::NotYetReleased,
192da585a0a8 *: fix formatting
Paper <paper@tflc.us>
parents: 369
diff changeset
45 SeriesStatus::Cancelled,
192da585a0a8 *: fix formatting
Paper <paper@tflc.us>
parents: 369
diff changeset
46 SeriesStatus::Hiatus,
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
47 };
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
48
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
49 enum class SeriesFormat {
279
657fda1b9cac *: clean up enums
Paper <paper@paper.us.eu.org>
parents: 264
diff changeset
50 Unknown = 0,
657fda1b9cac *: clean up enums
Paper <paper@paper.us.eu.org>
parents: 264
diff changeset
51 Tv,
657fda1b9cac *: clean up enums
Paper <paper@paper.us.eu.org>
parents: 264
diff changeset
52 TvShort,
657fda1b9cac *: clean up enums
Paper <paper@paper.us.eu.org>
parents: 264
diff changeset
53 Movie,
657fda1b9cac *: clean up enums
Paper <paper@paper.us.eu.org>
parents: 264
diff changeset
54 Special,
657fda1b9cac *: clean up enums
Paper <paper@paper.us.eu.org>
parents: 264
diff changeset
55 Ova,
657fda1b9cac *: clean up enums
Paper <paper@paper.us.eu.org>
parents: 264
diff changeset
56 Ona,
369
47c9f8502269 *: clang-format all the things
Paper <paper@tflc.us>
parents: 327
diff changeset
57 Music,
279
657fda1b9cac *: clean up enums
Paper <paper@paper.us.eu.org>
parents: 264
diff changeset
58 };
657fda1b9cac *: clean up enums
Paper <paper@paper.us.eu.org>
parents: 264
diff changeset
59
657fda1b9cac *: clean up enums
Paper <paper@paper.us.eu.org>
parents: 264
diff changeset
60 constexpr std::array<SeriesFormat, 8> SeriesFormats{
413
192da585a0a8 *: fix formatting
Paper <paper@tflc.us>
parents: 369
diff changeset
61 SeriesFormat::Unknown,
192da585a0a8 *: fix formatting
Paper <paper@tflc.us>
parents: 369
diff changeset
62 SeriesFormat::Tv,
192da585a0a8 *: fix formatting
Paper <paper@tflc.us>
parents: 369
diff changeset
63 SeriesFormat::TvShort,
192da585a0a8 *: fix formatting
Paper <paper@tflc.us>
parents: 369
diff changeset
64 SeriesFormat::Movie,
192da585a0a8 *: fix formatting
Paper <paper@tflc.us>
parents: 369
diff changeset
65 SeriesFormat::Special,
192da585a0a8 *: fix formatting
Paper <paper@tflc.us>
parents: 369
diff changeset
66 SeriesFormat::Ova,
192da585a0a8 *: fix formatting
Paper <paper@tflc.us>
parents: 369
diff changeset
67 SeriesFormat::Ona,
192da585a0a8 *: fix formatting
Paper <paper@tflc.us>
parents: 369
diff changeset
68 SeriesFormat::Music,
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
69 };
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
70
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
71 enum class TitleLanguage {
279
657fda1b9cac *: clean up enums
Paper <paper@paper.us.eu.org>
parents: 264
diff changeset
72 Romaji,
657fda1b9cac *: clean up enums
Paper <paper@paper.us.eu.org>
parents: 264
diff changeset
73 Native,
369
47c9f8502269 *: clang-format all the things
Paper <paper@tflc.us>
parents: 327
diff changeset
74 English,
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
75 };
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
76
369
47c9f8502269 *: clang-format all the things
Paper <paper@tflc.us>
parents: 327
diff changeset
77 constexpr std::array<TitleLanguage, 3> TitleLanguages{
413
192da585a0a8 *: fix formatting
Paper <paper@tflc.us>
parents: 369
diff changeset
78 TitleLanguage::Romaji,
192da585a0a8 *: fix formatting
Paper <paper@tflc.us>
parents: 369
diff changeset
79 TitleLanguage::Native,
192da585a0a8 *: fix formatting
Paper <paper@tflc.us>
parents: 369
diff changeset
80 TitleLanguage::English,
369
47c9f8502269 *: clang-format all the things
Paper <paper@tflc.us>
parents: 327
diff changeset
81 };
279
657fda1b9cac *: clean up enums
Paper <paper@paper.us.eu.org>
parents: 264
diff changeset
82
657fda1b9cac *: clean up enums
Paper <paper@paper.us.eu.org>
parents: 264
diff changeset
83 enum class Service {
657fda1b9cac *: clean up enums
Paper <paper@paper.us.eu.org>
parents: 264
diff changeset
84 None,
286
53e3c015a973 anime: initial cross-service support
Paper <paper@paper.us.eu.org>
parents: 284
diff changeset
85 AniList,
53e3c015a973 anime: initial cross-service support
Paper <paper@paper.us.eu.org>
parents: 284
diff changeset
86 MyAnimeList,
369
47c9f8502269 *: clang-format all the things
Paper <paper@tflc.us>
parents: 327
diff changeset
87 Kitsu,
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
88 };
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
89
286
53e3c015a973 anime: initial cross-service support
Paper <paper@paper.us.eu.org>
parents: 284
diff changeset
90 /* this doesn't include MAL and Kitsu because they aren't really
53e3c015a973 anime: initial cross-service support
Paper <paper@paper.us.eu.org>
parents: 284
diff changeset
91 * "valid" services yet. */
53e3c015a973 anime: initial cross-service support
Paper <paper@paper.us.eu.org>
parents: 284
diff changeset
92 constexpr std::array<Service, 3> Services{
413
192da585a0a8 *: fix formatting
Paper <paper@tflc.us>
parents: 369
diff changeset
93 Service::AniList,
192da585a0a8 *: fix formatting
Paper <paper@tflc.us>
parents: 369
diff changeset
94 Service::MyAnimeList,
192da585a0a8 *: fix formatting
Paper <paper@tflc.us>
parents: 369
diff changeset
95 Service::Kitsu,
286
53e3c015a973 anime: initial cross-service support
Paper <paper@paper.us.eu.org>
parents: 284
diff changeset
96 };
279
657fda1b9cac *: clean up enums
Paper <paper@paper.us.eu.org>
parents: 264
diff changeset
97
185
62e336597bb7 anime list: add support for different score formats
Paper <mrpapersonic@gmail.com>
parents: 184
diff changeset
98 enum class ScoreFormat {
279
657fda1b9cac *: clean up enums
Paper <paper@paper.us.eu.org>
parents: 264
diff changeset
99 Point100, // 0-100
657fda1b9cac *: clean up enums
Paper <paper@paper.us.eu.org>
parents: 264
diff changeset
100 Point10Decimal, // 0.0-10.0
657fda1b9cac *: clean up enums
Paper <paper@paper.us.eu.org>
parents: 264
diff changeset
101 Point10, // 0-10
657fda1b9cac *: clean up enums
Paper <paper@paper.us.eu.org>
parents: 264
diff changeset
102 Point5, // 0-5, should be represented in stars
369
47c9f8502269 *: clang-format all the things
Paper <paper@tflc.us>
parents: 327
diff changeset
103 Point3, // 1-3, should be represented in smileys
185
62e336597bb7 anime list: add support for different score formats
Paper <mrpapersonic@gmail.com>
parents: 184
diff changeset
104 };
62e336597bb7 anime list: add support for different score formats
Paper <mrpapersonic@gmail.com>
parents: 184
diff changeset
105
369
47c9f8502269 *: clang-format all the things
Paper <paper@tflc.us>
parents: 327
diff changeset
106 constexpr std::array<ScoreFormat, 5> ScoreFormats{
413
192da585a0a8 *: fix formatting
Paper <paper@tflc.us>
parents: 369
diff changeset
107 ScoreFormat::Point100,
192da585a0a8 *: fix formatting
Paper <paper@tflc.us>
parents: 369
diff changeset
108 ScoreFormat::Point10Decimal,
192da585a0a8 *: fix formatting
Paper <paper@tflc.us>
parents: 369
diff changeset
109 ScoreFormat::Point10,
192da585a0a8 *: fix formatting
Paper <paper@tflc.us>
parents: 369
diff changeset
110 ScoreFormat::Point5,
192da585a0a8 *: fix formatting
Paper <paper@tflc.us>
parents: 369
diff changeset
111 ScoreFormat::Point3,
369
47c9f8502269 *: clang-format all the things
Paper <paper@tflc.us>
parents: 327
diff changeset
112 };
189
649786bae914 *: etc. code cleanup
Paper <mrpapersonic@gmail.com>
parents: 185
diff changeset
113
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
114 struct ListInformation {
317
b1f4d1867ab1 services: VERY initial Kitsu support
Paper <paper@paper.us.eu.org>
parents: 286
diff changeset
115 std::string id;
258
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 250
diff changeset
116 int progress = 0;
279
657fda1b9cac *: clean up enums
Paper <paper@paper.us.eu.org>
parents: 264
diff changeset
117 int score = 0; // this will ALWAYS be in POINT_100 format internally
657fda1b9cac *: clean up enums
Paper <paper@paper.us.eu.org>
parents: 264
diff changeset
118 ListStatus status = ListStatus::NotInList;
258
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 250
diff changeset
119 Date started;
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 250
diff changeset
120 Date completed;
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 250
diff changeset
121 bool is_private = false;
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 250
diff changeset
122 unsigned int rewatched_times = 0;
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 250
diff changeset
123 bool rewatching = false;
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 250
diff changeset
124 uint64_t updated = 0;
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 250
diff changeset
125 std::string notes;
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
126 };
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
127
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
128 struct SeriesInformation {
258
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 250
diff changeset
129 int id;
286
53e3c015a973 anime: initial cross-service support
Paper <paper@paper.us.eu.org>
parents: 284
diff changeset
130 std::map<Service, std::string> ids;
284
e66ffc338d82 anime: refactor title structure to a map
Paper <paper@paper.us.eu.org>
parents: 279
diff changeset
131 std::map<TitleLanguage, std::string> titles;
258
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 250
diff changeset
132 std::vector<std::string> synonyms;
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 250
diff changeset
133 int episodes = 0;
279
657fda1b9cac *: clean up enums
Paper <paper@paper.us.eu.org>
parents: 264
diff changeset
134 SeriesStatus status = SeriesStatus::Unknown;
324
5d3c9b31aa6e anime: add completed date member
Paper <paper@paper.us.eu.org>
parents: 320
diff changeset
135 Date started;
5d3c9b31aa6e anime: add completed date member
Paper <paper@paper.us.eu.org>
parents: 320
diff changeset
136 Date completed;
258
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 250
diff changeset
137 std::vector<std::string> genres;
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 250
diff changeset
138 std::vector<std::string> producers;
279
657fda1b9cac *: clean up enums
Paper <paper@paper.us.eu.org>
parents: 264
diff changeset
139 SeriesFormat format = SeriesFormat::Unknown;
317
b1f4d1867ab1 services: VERY initial Kitsu support
Paper <paper@paper.us.eu.org>
parents: 286
diff changeset
140 double audience_score = 0;
258
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 250
diff changeset
141 std::string synopsis;
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 250
diff changeset
142 int duration = 0;
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 250
diff changeset
143 std::string poster_url;
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
144 };
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
145
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
146 class Anime {
258
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 250
diff changeset
147 public:
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 250
diff changeset
148 /* User list data */
317
b1f4d1867ab1 services: VERY initial Kitsu support
Paper <paper@paper.us.eu.org>
parents: 286
diff changeset
149 std::string GetUserId() const;
258
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 250
diff changeset
150 ListStatus GetUserStatus() const;
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 250
diff changeset
151 int GetUserProgress() const;
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 250
diff changeset
152 int GetUserScore() const;
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 250
diff changeset
153 std::string GetUserPresentableScore() const;
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 250
diff changeset
154 Date GetUserDateStarted() const;
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 250
diff changeset
155 Date GetUserDateCompleted() const;
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 250
diff changeset
156 bool GetUserIsPrivate() const;
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 250
diff changeset
157 unsigned int GetUserRewatchedTimes() const;
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 250
diff changeset
158 bool GetUserIsRewatching() const;
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 250
diff changeset
159 uint64_t GetUserTimeUpdated() const;
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 250
diff changeset
160 std::string GetUserNotes() const;
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
161
369
47c9f8502269 *: clang-format all the things
Paper <paper@tflc.us>
parents: 327
diff changeset
162 void SetUserId(const std::string &id);
258
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 250
diff changeset
163 void SetUserStatus(ListStatus status);
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 250
diff changeset
164 void SetUserScore(int score);
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 250
diff changeset
165 void SetUserProgress(int progress);
369
47c9f8502269 *: clang-format all the things
Paper <paper@tflc.us>
parents: 327
diff changeset
166 void SetUserDateStarted(const Date &started);
47c9f8502269 *: clang-format all the things
Paper <paper@tflc.us>
parents: 327
diff changeset
167 void SetUserDateCompleted(const Date &completed);
258
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 250
diff changeset
168 void SetUserIsPrivate(bool is_private);
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 250
diff changeset
169 void SetUserRewatchedTimes(int rewatched);
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 250
diff changeset
170 void SetUserIsRewatching(bool rewatching);
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 250
diff changeset
171 void SetUserTimeUpdated(uint64_t updated);
369
47c9f8502269 *: clang-format all the things
Paper <paper@tflc.us>
parents: 327
diff changeset
172 void SetUserNotes(const std::string &notes);
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
173
258
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 250
diff changeset
174 /* Series data */
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 250
diff changeset
175 int GetId() const;
286
53e3c015a973 anime: initial cross-service support
Paper <paper@paper.us.eu.org>
parents: 284
diff changeset
176 std::optional<std::string> GetServiceId(Service service) const;
284
e66ffc338d82 anime: refactor title structure to a map
Paper <paper@paper.us.eu.org>
parents: 279
diff changeset
177 std::optional<std::string> GetTitle(TitleLanguage language) const;
258
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 250
diff changeset
178 std::vector<std::string> GetTitleSynonyms() const;
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 250
diff changeset
179 int GetEpisodes() const;
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 250
diff changeset
180 SeriesStatus GetAiringStatus() const;
324
5d3c9b31aa6e anime: add completed date member
Paper <paper@paper.us.eu.org>
parents: 320
diff changeset
181 Date GetStartedDate() const;
5d3c9b31aa6e anime: add completed date member
Paper <paper@paper.us.eu.org>
parents: 320
diff changeset
182 Date GetCompletedDate() const;
258
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 250
diff changeset
183 std::vector<std::string> GetGenres() const;
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 250
diff changeset
184 std::vector<std::string> GetProducers() const;
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 250
diff changeset
185 SeriesFormat GetFormat() const;
327
b5d6c27c308f anime: refactor Anime::SeriesSeason to Season class
Paper <paper@paper.us.eu.org>
parents: 324
diff changeset
186 Season GetSeason() const;
317
b1f4d1867ab1 services: VERY initial Kitsu support
Paper <paper@paper.us.eu.org>
parents: 286
diff changeset
187 double GetAudienceScore() const;
258
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 250
diff changeset
188 std::string GetSynopsis() const;
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 250
diff changeset
189 int GetDuration() const;
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 250
diff changeset
190 std::string GetPosterUrl() const;
286
53e3c015a973 anime: initial cross-service support
Paper <paper@paper.us.eu.org>
parents: 284
diff changeset
191 std::optional<std::string> GetServiceUrl(Service service) const;
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
192
258
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 250
diff changeset
193 void SetId(int id);
369
47c9f8502269 *: clang-format all the things
Paper <paper@tflc.us>
parents: 327
diff changeset
194 void SetServiceId(Service service, const std::string &id);
47c9f8502269 *: clang-format all the things
Paper <paper@tflc.us>
parents: 327
diff changeset
195 void SetTitle(TitleLanguage language, const std::string &title);
47c9f8502269 *: clang-format all the things
Paper <paper@tflc.us>
parents: 327
diff changeset
196 void SetTitleSynonyms(const std::vector<std::string> &synonyms);
47c9f8502269 *: clang-format all the things
Paper <paper@tflc.us>
parents: 327
diff changeset
197 void AddTitleSynonym(const std::string &synonym);
258
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 250
diff changeset
198 void SetEpisodes(int episodes);
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 250
diff changeset
199 void SetAiringStatus(SeriesStatus status);
369
47c9f8502269 *: clang-format all the things
Paper <paper@tflc.us>
parents: 327
diff changeset
200 void SetStartedDate(const Date &date);
47c9f8502269 *: clang-format all the things
Paper <paper@tflc.us>
parents: 327
diff changeset
201 void SetCompletedDate(const Date &date);
47c9f8502269 *: clang-format all the things
Paper <paper@tflc.us>
parents: 327
diff changeset
202 void SetGenres(const std::vector<std::string> &genres);
47c9f8502269 *: clang-format all the things
Paper <paper@tflc.us>
parents: 327
diff changeset
203 void SetProducers(const std::vector<std::string> &producers);
258
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 250
diff changeset
204 void SetFormat(SeriesFormat format);
317
b1f4d1867ab1 services: VERY initial Kitsu support
Paper <paper@paper.us.eu.org>
parents: 286
diff changeset
205 void SetAudienceScore(double audience_score);
258
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 250
diff changeset
206 void SetSynopsis(std::string synopsis);
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 250
diff changeset
207 void SetDuration(int duration);
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 250
diff changeset
208 void SetPosterUrl(std::string poster);
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
209
258
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 250
diff changeset
210 std::string GetUserPreferredTitle() const;
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
211
258
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 250
diff changeset
212 /* User stuff */
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 250
diff changeset
213 void AddToUserList();
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 250
diff changeset
214 bool IsInUserList() const;
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 250
diff changeset
215 void RemoveFromUserList();
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
216
258
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 250
diff changeset
217 private:
862d0d8619f6 *: HUUUGE changes
Paper <paper@paper.us.eu.org>
parents: 250
diff changeset
218 SeriesInformation info_;
264
9a04802848c0 *: improve multiple things
Paper <paper@paper.us.eu.org>
parents: 261
diff changeset
219 std::optional<struct ListInformation> list_info_ = std::nullopt;
9
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
220 };
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
221
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
222 } // namespace Anime
5c0397762b53 INCOMPLETE: megacommit :)
Paper <mrpapersonic@gmail.com>
parents:
diff changeset
223
261
3ec7804abf17 include: make header guards more sane
Paper <paper@paper.us.eu.org>
parents: 260
diff changeset
224 #endif // MINORI_CORE_ANIME_H_