Taknok / youtube-auto-like

Web extension that automatically likes videos from your subscribed channels.
MIT License
73 stars 13 forks source link

Like at % Watched not Working #59

Open wisnoskij opened 2 years ago

wisnoskij commented 2 years ago

Expected Behavior Like the video at 50% watched during playback.

Actual Behavior Does not ever like the video unless I refresh the page after reaching the threshold

To Reproduce Steps to reproduce the behaviour:

  1. Set the extension to like at any %.
  2. Watch video
  3. See that it is still unliked
  4. Disabled extension and refresh, still unliked
  5. Enable extension and refresh
  6. See it is liked.

Specification

wisnoskij commented 2 years ago

3.5.0 I got the issue to happen. If I remember correctly, it used to be reproducible with 100% accuracy after I figured out the trigger. It seems to be like 10-30% chance now, unless it is some issue to do with half loading the home page or some weird trick like that, I cannot reproduce the issue most times, but I just got it to happen twice. Maybe it is based on the order the mods are loaded in or something like that.

Addendum: Just shutdown FF and started it back up again like 10 times and could not get the issue again.

RubenKelevra commented 2 years ago

95% with which plugin version ?

I'm running right now the 3.5.0 The issue for the last 5% is SponsorBlock I think.

Just an educated guess, but I think this is going on:

The solution would be (in general for all types of skipping) to just count the watch time in the current tab, and if it's over x % a like will be sent.

This also avoids liking content where you just skip to a certain portion and doesn't watch the whole thing. :)

Taknok commented 2 years ago

@RubenKelevra The code is already doing this, meaning if you start a vidéo and immediately click to the end, the plugin should like the video. https://github.com/Taknok/youtube-auto-like/blob/e9043abc158fadf61c3f59bda89aa54732cf93a4/app/scripts/modules/liker-material.js#L235

The plugin get the current time of the vidso, meaning if you jump to 30min after 5s of playing the currentTime will be 30min.

I will look the behavior with sponsor block again and on a longer period, because I'm not using it personally.

RubenKelevra commented 2 years ago

Ah okay. No I don't think you have to worry about it then. It's just, that sometimes videos don't get liked and I just don't know why.

Regarding your current approach: I think it's better get the actual time the user plays back the video and only after x% of watch time compared to the length of the video it will get liked.

Meaning that if I for example open a video which is clickbait and I skip forward to the highlight portion of the video, it will be liked, despite that I only watched a couple of seconds of it.

Regarding Sponsor Block: Give the add-on a look, its great :)

Taknok commented 2 years ago

Even with sponsor block enabled to skip everything, I cannot reproduce the issue with more than 200 videos played :/

Taknok commented 2 years ago

If someone having this issue can look into the html code and the addon code. It will gladly help :/

Taknok commented 1 year ago

Is the issue fix with the new version of the addon ? (I will close in 7 days without answer, feel free to comment for re-opening it)

wisnoskij commented 1 year ago

I forgot to check this morning, but I have seen this issue since the new YT format and the extension update for it. I will try to remember to check specifically the next time I start my computer. The issue seemed unchanged.

wisnoskij commented 1 year ago

Turns out my first tab still had this issue ongoing, so I can absolutely state that this issue persists unchanged.

Taknok commented 1 year ago

Does 3.6.2 fix this issue ?

wisnoskij commented 1 year ago

Yes, I am fairly certain it is working for me now.

Taknok commented 1 year ago

Ok, I will wait one more week before closing it.

RubenKelevra commented 1 year ago

Hey @Taknok, I've noticed that it seems to be broken, still (or again?) (sometimes):

Screenshot from 2023-03-16 16-41-37


So it's a new tab, I've opened youtube.com, searched for a video, loaded it. SponsorBlock would skip the end and then “autoplay next” would just play the next video.

I did go “back” in the browser, and the video wasn't liked.

I tried reproducing it three times, but every time the video would be liked. So it's rare, that it's not working.

I'm running version 3.6.2.

Taknok commented 1 year ago

Hi, Can you activate the logs (guide https://youtu.be/C4fQXRYwbrs?t=68) and send it back here when you see the issue ? You just have to activate the log, use youtube normally, and when seeing the bug do ctrl + shift + K scroll to find the logs and paste here.

wisnoskij commented 1 year ago

Can confirm, just noticed a video not get liked 5 minutes ago. Enabled debug so if it happened again I will have logs.

wisnoskij commented 1 year ago

Hmm, yes seems different this time. The videos just don't ever get liked. I even tried instant like and it failed.

https://pastebin.com/CywpPUrj

Looks like they changed the button ids or something like that.

Taknok commented 1 year ago

Hi, I pushed a fix. Can you try the version on dev branch ? And tell me if the issue is fixed ? Guide: https://youtu.be/C4fQXRYwbrs?t=68

wisnoskij commented 1 year ago

Yes, I tested instant like for every video and it worked right off.

Taknok commented 1 year ago

The new version is sent to firefox for validation.

Taknok commented 1 year ago

Does the new version fix the issue ?

wisnoskij commented 1 year ago

Works for me.

On Sun, 19 Mar 2023 at 18:10, Pg @.***> wrote:

Does the new version fix the issue ?

— Reply to this email directly, view it on GitHub https://github.com/Taknok/youtube-auto-like/issues/59#issuecomment-1475414154, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABIBM5ZY7PHLYN37FEXEA33W4577HANCNFSM5SLRQP4A . You are receiving this because you were mentioned.Message ID: @.***>

Taknok commented 1 year ago

Ok, I will close it in 1 week if no one says otherwise.

JoelleEmmily commented 1 year ago

Same issue

Uncaught (in promise) Error: creatorBlock is null 2 undefined

Taknok commented 1 year ago

Ok, it seems that a new youtube version is released as the script cannot grab the creator block. I will look into it.

Taknok commented 1 year ago

Is this issue still present on the new youtube grid version ?