comparison include/core/anime.h @ 327:b5d6c27c308f

anime: refactor Anime::SeriesSeason to Season class ToLocalString has also been altered to take in both season and year because lots of locales actually treat formatting seasons differently! most notably is Russian which adds a suffix at the end to notate seasons(??)
author Paper <paper@paper.us.eu.org>
date Thu, 13 Jun 2024 01:49:18 -0400
parents 5d3c9b31aa6e
children
comparison
equal deleted inserted replaced
326:10096c5489e3 327:b5d6c27c308f
1 #ifndef MINORI_CORE_ANIME_H_ 1 #ifndef MINORI_CORE_ANIME_H_
2 #define MINORI_CORE_ANIME_H_ 2 #define MINORI_CORE_ANIME_H_
3 3
4 #include "core/anime_season.h"
4 #include "core/date.h" 5 #include "core/date.h"
6
5 #include <array> 7 #include <array>
6 #include <map> 8 #include <map>
7 #include <vector> 9 #include <vector>
8 #include <optional> 10 #include <optional>
9 11
59 SeriesFormat::Movie, 61 SeriesFormat::Movie,
60 SeriesFormat::Special, 62 SeriesFormat::Special,
61 SeriesFormat::Ova, 63 SeriesFormat::Ova,
62 SeriesFormat::Ona, 64 SeriesFormat::Ona,
63 SeriesFormat::Music 65 SeriesFormat::Music
64 };
65
66 enum class SeriesSeason {
67 Unknown = 0,
68 Winter,
69 Spring,
70 Summer,
71 Fall
72 };
73
74 constexpr std::array<SeriesSeason, 4> SeriesSeasons{
75 SeriesSeason::Winter, SeriesSeason::Spring,
76 SeriesSeason::Summer, SeriesSeason::Fall
77 }; 66 };
78 67
79 enum class TitleLanguage { 68 enum class TitleLanguage {
80 Romaji, 69 Romaji,
81 Native, 70 Native,
180 Date GetStartedDate() const; 169 Date GetStartedDate() const;
181 Date GetCompletedDate() const; 170 Date GetCompletedDate() const;
182 std::vector<std::string> GetGenres() const; 171 std::vector<std::string> GetGenres() const;
183 std::vector<std::string> GetProducers() const; 172 std::vector<std::string> GetProducers() const;
184 SeriesFormat GetFormat() const; 173 SeriesFormat GetFormat() const;
185 SeriesSeason GetSeason() const; 174 Season GetSeason() const;
186 double GetAudienceScore() const; 175 double GetAudienceScore() const;
187 std::string GetSynopsis() const; 176 std::string GetSynopsis() const;
188 int GetDuration() const; 177 int GetDuration() const;
189 std::string GetPosterUrl() const; 178 std::string GetPosterUrl() const;
190 std::optional<std::string> GetServiceUrl(Service service) const; 179 std::optional<std::string> GetServiceUrl(Service service) const;