annotate include/core/anime.h @ 309:bf89fbf7ff38

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