Closed TheFrodo closed 1 year ago
Here's what I've come up with.
On every initial page load of a video (https://ganymede.domain.net/vods/4aa5aab3-49ee-11ee-b96c-0242ac130004) a request is sent to a new endpoint. The new endpoint currently only houses the logic to increment the local_view
column on the vod
table by 1. So every page load, authenticated or unauthenticated, will increment the view. I'll probably show the local view count along side the source view count.
Work in progress here https://github.com/Zibbp/ganymede/pull/288
Let me know what you think.
That sounds good. Only I'm worried that you can manipulate the views in this way. Simply with a F5.
It probably doesn't matter, but wouldn't it make sense to somehow build in a security mechanism?
With counting un-authenticated view, the security mechanisms are limited. I'd have to store the user's IP temporarily to ensure the IP is only tied to one view in X hours. I don't really want to mess around with that, especially as a lot of users are using a reverse proxy, the IP may not be the real user's IP.
I don't see real harm in someone abusing this, it's only a view count.
That's right, I hadn't thought of that at all. Yes, you're right, that's not really a big security risk.
I should think first, then write :D
Good evening,
Would it be possible to count the views depending on how many have viewed the VOD on Ganymede? Currently there are the views of Twitch, but it would make sense if there would be the views of Ganymede, or do I see it wrong?