Mercurial > minori
comparison include/core/anime.h @ 185:62e336597bb7
anime list: add support for different score formats
| author | Paper <mrpapersonic@gmail.com> |
|---|---|
| date | Tue, 05 Dec 2023 13:45:23 -0500 |
| parents | 09492158bcc5 |
| children | 649786bae914 |
comparison
equal
deleted
inserted
replaced
| 184:09492158bcc5 | 185:62e336597bb7 |
|---|---|
| 60 NONE, | 60 NONE, |
| 61 ANILIST, | 61 ANILIST, |
| 62 NB_SERVICES | 62 NB_SERVICES |
| 63 }; | 63 }; |
| 64 | 64 |
| 65 enum class ScoreFormat { | |
| 66 POINT_100, // 0-100 | |
| 67 POINT_10_DECIMAL, // 0.0-10.0 | |
| 68 POINT_10, // 0-10 | |
| 69 POINT_5, // 0-5, should be represented in stars | |
| 70 POINT_3 // 1-3, should be represented in smileys | |
| 71 }; | |
| 72 | |
| 65 struct ListInformation { | 73 struct ListInformation { |
| 66 int id = 0; | 74 int id = 0; |
| 67 int progress = 0; | 75 int progress = 0; |
| 68 int score = 0; // always in the AniList 100-based form internally | 76 int score = 0; // note that this will ALWAYS be in POINT_100 format and must be converted |
| 69 ListStatus status = ListStatus::NOT_IN_LIST; | 77 ListStatus status = ListStatus::NOT_IN_LIST; |
| 70 Date started; | 78 Date started; |
| 71 Date completed; | 79 Date completed; |
| 72 bool is_private = false; | 80 bool is_private = false; |
| 73 unsigned int rewatched_times = 0; | 81 unsigned int rewatched_times = 0; |
| 101 public: | 109 public: |
| 102 /* User list data */ | 110 /* User list data */ |
| 103 ListStatus GetUserStatus() const; | 111 ListStatus GetUserStatus() const; |
| 104 int GetUserProgress() const; | 112 int GetUserProgress() const; |
| 105 int GetUserScore() const; | 113 int GetUserScore() const; |
| 114 std::string GetUserPresentableScore() const; | |
| 106 Date GetUserDateStarted() const; | 115 Date GetUserDateStarted() const; |
| 107 Date GetUserDateCompleted() const; | 116 Date GetUserDateCompleted() const; |
| 108 bool GetUserIsPrivate() const; | 117 bool GetUserIsPrivate() const; |
| 109 unsigned int GetUserRewatchedTimes() const; | 118 unsigned int GetUserRewatchedTimes() const; |
| 110 bool GetUserIsRewatching() const; | 119 bool GetUserIsRewatching() const; |
