mirror of
https://gitea.invidious.io/iv-org/invidious-copy-2022-08-14.git
synced 2024-08-15 00:53:20 +00:00
Fix video indexing
This commit is contained in:
parent
1facca5408
commit
d79c1ff3e9
2 changed files with 24 additions and 9 deletions
|
@ -182,7 +182,11 @@ get "/watch" do |env|
|
|||
rating = video.info["avg_rating"].to_f64
|
||||
|
||||
engagement = ((video.dislikes.to_f + video.likes.to_f)/video.views * 100)
|
||||
if video.likes > 0 || video.dislikes > 0
|
||||
calculated_rating = (video.likes.to_f/(video.likes.to_f + video.dislikes.to_f) * 4 + 1)
|
||||
else
|
||||
calculated_rating = 0.0
|
||||
end
|
||||
|
||||
templated "watch"
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue