Mercurial > minori
diff 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 |
line wrap: on
line diff
--- a/include/core/anime.h Mon Dec 04 13:44:42 2023 -0500 +++ b/include/core/anime.h Tue Dec 05 13:45:23 2023 -0500 @@ -62,10 +62,18 @@ NB_SERVICES }; +enum class ScoreFormat { + POINT_100, // 0-100 + POINT_10_DECIMAL, // 0.0-10.0 + POINT_10, // 0-10 + POINT_5, // 0-5, should be represented in stars + POINT_3 // 1-3, should be represented in smileys +}; + struct ListInformation { int id = 0; int progress = 0; - int score = 0; // always in the AniList 100-based form internally + int score = 0; // note that this will ALWAYS be in POINT_100 format and must be converted ListStatus status = ListStatus::NOT_IN_LIST; Date started; Date completed; @@ -103,6 +111,7 @@ ListStatus GetUserStatus() const; int GetUserProgress() const; int GetUserScore() const; + std::string GetUserPresentableScore() const; Date GetUserDateStarted() const; Date GetUserDateCompleted() const; bool GetUserIsPrivate() const;