From: APTX Date: Wed, 23 May 2012 22:35:59 +0000 (+0200) Subject: I though I got this... X-Git-Url: https://gitweb.tyo.aptx.org/?a=commitdiff_plain;h=69943f814bf7dee112835d701e1b0fbf746ef3d7;p=anidbudpclient.git I though I got this... --- diff --git a/animecommand.cpp b/animecommand.cpp index c31f88d..4bf9026 100644 --- a/animecommand.cpp +++ b/animecommand.cpp @@ -262,7 +262,7 @@ int AnimeReply::reviewCount() const double AnimeReply::averageReviewRating() const { - return animeFlagData.value(AnimeFlag::AverageReviewRating).toDouble() / 1000; + return animeFlagData.value(AnimeFlag::AverageReviewRating).toDouble() / 100; } int AnimeReply::tempVoteCount() const @@ -272,7 +272,7 @@ int AnimeReply::tempVoteCount() const double AnimeReply::tempRating() const { - return animeFlagData.value(AnimeFlag::TempRating).toDouble() / 1000; + return animeFlagData.value(AnimeFlag::TempRating).toDouble() / 100; } int AnimeReply::voteCount() const @@ -282,7 +282,7 @@ int AnimeReply::voteCount() const double AnimeReply::rating() const { - return animeFlagData.value(AnimeFlag::Rating).toDouble() / 1000; + return animeFlagData.value(AnimeFlag::Rating).toDouble() / 100; } QStringList AnimeReply::categoryIdList() const diff --git a/episodecommand.cpp b/episodecommand.cpp index 812a193..527fb1d 100644 --- a/episodecommand.cpp +++ b/episodecommand.cpp @@ -188,7 +188,7 @@ void EpisodeReply::setRawReply(ReplyCode replyCode, const QString &reply) m_eid = parts[0].toInt(&ok, 10); m_aid = parts[1].toInt(&ok, 10); m_length = parts[2].toInt(&ok, 10); - m_rating = parts[3].toDouble(&ok) / 1000; + m_rating = parts[3].toDouble(&ok) / 100; m_votes = parts[4].toInt(&ok, 10); m_epno = parts[5]; diff --git a/filecommand.cpp b/filecommand.cpp index a2647bb..4b6e888 100644 --- a/filecommand.cpp +++ b/filecommand.cpp @@ -376,7 +376,7 @@ int FileReply::episodeVoteCount() const double FileReply::episodeRating() const { - return fileAnimeFlagData.value(FileAnimeFlag::EpisodeRating).toInt() / 1000; + return fileAnimeFlagData.value(FileAnimeFlag::EpisodeRating).toDouble() / 100; } QString FileReply::epKanjiName() const diff --git a/votecommand.cpp b/votecommand.cpp index f14b7db..349c933 100644 --- a/votecommand.cpp +++ b/votecommand.cpp @@ -50,7 +50,7 @@ VoteCommand::VoteCommand(VoteType voteType, int id, double vote, int epno) init(); m_voteType = voteType; m_id = id; - m_value = int(vote * 1000); + m_value = int(vote * 100); m_epno = epno; } @@ -59,7 +59,7 @@ VoteCommand::VoteCommand(VoteType voteType, const QString &name, double vote, in init(); m_voteType = voteType; m_name = name; - m_value = int(vote * 1000); + m_value = int(vote * 100); m_epno = epno; } @@ -190,7 +190,7 @@ int VoteReply::value() const double VoteReply::vote() const { - return double(m_value) / 1000; + return double(m_value) / 100; } AniDBUdpClient::VoteCommand::VoteType VoteReply::voteType() const