x0a / uBO-YouTube

Easier way to exempt your favorite YouTube channels from adblocking.
GNU General Public License v3.0
124 stars 8 forks source link

Auto ad skipping (30s) not working #21

Closed Brissinger closed 3 years ago

Brissinger commented 3 years ago

Hi again. Auto skipping 30s is not working but 5s option is working. Latest firefox.

bug

x0a commented 3 years ago

Hey Brissinger,

Sorry I missed this one and for the super late response. I've been able to reproduce the bug on consecutive ads where the first ad is 15s and the second one is 30s+. Does this match what you've been seeing?

It is likely due to the fact that we check video.src to see if it matches the video we originally detected. If it doesn't it doesn't do any skipping. This one will likely a lot of refactoring since the .src check is important so we don't accidentally skip the actual video.

I'll work on this over the next 2-3 days.

Brissinger commented 3 years ago

Hey Brissinger,

Sorry I missed this one and for the super late response. I've been able to reproduce the bug on consecutive ads where the first ad is 15s and the second one is 30s+. Does this match what you've been seeing?

It is likely due to the fact that we check video.src to see if it matches the video we originally detected. If it doesn't it doesn't do any skipping. This one will likely a lot of refactoring since the .src check is important so we don't accidentally skip the actual video.

I'll work on this over the next 2-3 days.

Hi I tested it again and i had e.g 2 ads -1of2 ad had 36s and it was displayed for full 36s, not skipped. Then started 2nd ad and it was 30s. 5s option skipped ad when i turned it off and on again with slider. Maybe something is wrong with remembering/loading auto ad skipping option still?

x0a commented 3 years ago

Thanks for the clarification.

There's a way to find out for sure. If you open up the settings (without changing anything), press F12 and expand the object next to Received settings:, what does it say next to autoSkipSeconds? There may be a bug on the content side but we can at least confirm that the settings page is receiving the settings properly. Screenshot 2020-10-16 185725

But before you do that, can you update to v0.11.9, refresh YT, and see if there's been an improvement? I pushed a fix to resolve the bug that I was able to witness (related to yours), and it maybe might fix this bug as well.

Brissinger commented 3 years ago

Thanks for the clarification.

There's a way to find out for sure. If you open up the settings (without changing anything), press F12 and expand the object next to Received settings:, what does it say next to autoSkipSeconds? There may be a bug on the content side but we can at least confirm that the settings page is receiving the settings properly. Screenshot 2020-10-16 185725

But before you do that, can you update to v0.11.9, refresh YT, and see if there's been an improvement? I pushed a fix to resolve the bug that I was able to witness (related to yours), and it maybe might fix this bug as well.

(i didn't changed any settings/sliders for this and next session) 1 I checked console first 11111 2 I updated addon and restarted Firefox 3 I checked console again it looks the same as before 4 I looked for an ad over 30s long and it got skipped after 30s (1of 2 ad 1min long) It seems it works now, thanks man :) Btw in Polish translation file there is no "Right arrow key to force skip ads" string to translate :)

x0a commented 3 years ago

Btw in Polish translation file there is no "Right arrow key to force skip ads" string to translate :)

Yes of course! I will upload the source file today.

Happy to hear its working now, feel free to re-open if it acts up again. Thanks