summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormark9064 <30447455+mark9064@users.noreply.github.com>2021-02-28 11:59:46 +0000
committerGitHub <noreply@github.com>2021-02-28 11:59:46 +0000
commit9ae18b0b3b3c8c10eaf52c86be929bf652dafe5b (patch)
tree5c489308367e80a0e798ccad2f3f7915f7433d2f
parent489d0151ad0e72b875729b4a7839cc0df2692571 (diff)
downloadinvidious-9ae18b0b3b3c8c10eaf52c86be929bf652dafe5b.tar.gz
invidious-9ae18b0b3b3c8c10eaf52c86be929bf652dafe5b.tar.bz2
invidious-9ae18b0b3b3c8c10eaf52c86be929bf652dafe5b.zip
Fix engagement
Engagement was calculated as 0-1 but displayed as a percentage
-rw-r--r--src/invidious/videos.cr2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/invidious/videos.cr b/src/invidious/videos.cr
index 95d9a80c..e6d4c764 100644
--- a/src/invidious/videos.cr
+++ b/src/invidious/videos.cr
@@ -764,7 +764,7 @@ struct Video
end
def engagement : Float64
- ((likes + dislikes) / views).round(4)
+ (((likes + dislikes) / views) * 100).round(4)
end
def reason : String?