Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

time spent calculations off when minimum page time set to 1min #11997

Closed
kjozwiak opened this issue Nov 16, 2017 · 6 comments
Closed

time spent calculations off when minimum page time set to 1min #11997

kjozwiak opened this issue Nov 16, 2017 · 6 comments

Comments

@kjozwiak
Copy link
Member

kjozwiak commented Nov 16, 2017

Test plan

#12004 (comment)


Description

Calculated "Time Spent" values won't match the video's running time when using 1min under Minimum page time before logging a visit via "Advanced Settings".

Steps to Reproduce

  1. launch 0.19.95 and create/enable the wallet via about:preferences#payments
  2. Click on the "Advanced" settings and select 1 minute & 1 visit
  3. open a new tab and load https://www.youtube.com/watch?v=8-Cjsnq8kVU
  4. let the video play for ~1.5 min, and switch over to about:preferences#payments

Actual result:

You'll notice that the "time spent" will be anywhere in the range of ~4-6mins when in reality you've only spent ~1minute on the video.

screen shot 2017-11-15 at 11 55 03 pm

Expected result:

Time spend should be around the same time as the video that was watched.

Reproduces how often:

100% of the time using the above STR.

Brave Version

about:brave info:

Brave: 0.19.95
rev: cc0ebad
Muon: 4.5.16
libchromiumcontent: 62.0.3202.94

Reproducible on current live release:

N/A

Additional Information

Platforms:

  • macOS 10.12.6 x64 using 0.19.95- Reproduced
  • Win 10 x64 using 0.19.95 - Reproduced
  • Ubuntu Ubuntu 17.04 x64 - Reproduced

CC'ing @NejcZdovc

@srirambv
Copy link
Collaborator

Setting 1min/5visit in advance setting and watching 5 videos from the same channel for 1min 10 sec each shows time spent as 24 mins
image

@NejcZdovc
Copy link
Contributor

problem it that we are setting min visit time if reported time is bellow that threshold. So for example if you watch 10s we will log 1min and so on

NejcZdovc added a commit to NejcZdovc/browser-laptop that referenced this issue Nov 16, 2017
Resolves brave#11997

Auditors:

Test Plan:
bsclifton added a commit that referenced this issue Nov 20, 2017
bsclifton added a commit that referenced this issue Nov 20, 2017
bsclifton added a commit that referenced this issue Nov 20, 2017
bsclifton added a commit that referenced this issue Nov 20, 2017
@srirambv
Copy link
Collaborator

Fails on Windows.

STR:

  1. Clean profile 0.19.98
  2. Enable payments, Change min time to 1min, Disable auto-include YT videos
  3. Watch https://www.youtube.com/watch?v=1u5jO57eD-U for 2 mins
  4. Ledger table only shows YouTube with time 1m33s, no channel listed
  5. Complete the video of 3min46sec, switch to payments, still no channel listed
  6. Open a new tab visit any site for 1 min
  7. Site gets listed but YT channel is still not listed.
    image

@srirambv srirambv reopened this Nov 28, 2017
@NejcZdovc
Copy link
Contributor

NejcZdovc commented Nov 28, 2017

@srirambv you have "Allow contributions to videos" toggled off. If this is turned off YT will not be recorded.

@srirambv
Copy link
Collaborator

Shouldn't the channel be listed and excluded if Allow contributions to videos is turned off?

@NejcZdovc
Copy link
Contributor

this option is working a little bit differently. Because you can easily stack up youtube channels, you can completely disable this media publishers feature with this toggle.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.