Skip to content

Commit

Permalink
- FIX: Fixed issue where view count for videos was increased too often.
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastian-raubach committed Jul 2, 2022
1 parent f066096 commit f941547
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -756,11 +756,11 @@ else if (!AuthenticationFilter.isValidImageToken(token))
// Check if the image exists
if (file.exists() && file.isFile())
{
image.setViewCount(image.getViewCount() + 1);
image.store(IMAGES.VIEW_COUNT);

if (isHead)
{
image.setViewCount(image.getViewCount() + 1);
image.store(IMAGES.VIEW_COUNT);

return Response.ok()
.status(Response.Status.PARTIAL_CONTENT)
.header(HttpHeaders.CONTENT_LENGTH, file.length())
Expand Down

0 comments on commit f941547

Please sign in to comment.