Mercurial > minori
diff src/services/anilist.cc @ 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 | 9613d72b097e |
line wrap: on
line diff
--- a/src/services/anilist.cc Mon Dec 04 13:44:42 2023 -0500 +++ b/src/services/anilist.cc Tue Dec 05 13:45:23 2023 -0500 @@ -18,13 +18,13 @@ #include <iostream> -#define CLIENT_ID "13706" - using namespace nlohmann::literals::json_literals; namespace Services { namespace AniList { +constexpr int CLIENT_ID = 13706; + class Account { public: std::string Username() const { return session.config.auth.anilist.username; } @@ -305,7 +305,7 @@ bool AuthorizeUser() { /* Prompt for PIN */ QDesktopServices::openUrl( - QUrl("https://anilist.co/api/v2/oauth/authorize?client_id=" CLIENT_ID "&response_type=token")); + QUrl(Strings::ToQString("https://anilist.co/api/v2/oauth/authorize?client_id=" + std::to_string(CLIENT_ID) + "&response_type=token"))); bool ok; QString token = QInputDialog::getText(