elliotwaite / thumbnail-rating-bar-for-youtube

A Chrome and Firefox extension for YouTube that adds a rating bar (likes/dislikes ratio) to the bottom of every thumbnail.
https://chrome.google.com/webstore/detail/youtube-thumbnail-rating/cmlddjbnoehmihdmfhaacemlpgfbpoeb
MIT License
250 stars 15 forks source link

Extensions shows wrong ratings #4

Closed Liz-chan closed 2 years ago

Liz-chan commented 6 years ago

Sometimes the extension gives a video the wrong rating, which is definitely not good since it could deter me from watching potential good videos in the future. These pictures should tell you what I mean. image image As you can see, it gives the video a completely wrong rating, and when you actually click on the video, it shows the correct rating. Any thoughts on why it does this?

Addition: It seems this doesn't happen on searches, but I just did a quick search for the same video.

elliotwaite commented 6 years ago

Dang, that's really bad.

I recently fixed a bug that was occurring when trying to update over 50 thumbnails at once, which may have been related to this. Can you make sure you're on the latest version (at least 0.0.24), you can see the version in the chrome://extensions/ window if you turn on the "Developer mode" switch at the top right of the page.

Was that on a suggested video that it gave the wrong rating? If you are somehow able to figure out how to reproduce this so I can debug it, that'd be great. I'll try to see if I can get it to happen for me.

Liz-chan commented 6 years ago

Yep, I'm on the latest version according to Chrome. Checked and it said 0.0.24. Even on videos that aren't recommended to me, it still happens. Here it is with another video. image image

elliotwaite commented 6 years ago

Okay. Can you link me to the page where it occurred?

Liz-chan commented 6 years ago

Sure, here you go. https://youtu.be/CzueOh-d15M

EDIT: I opened it in an incognito window and it seems to not do that, could it be another extension? EDIT2: Eh what? I refreshed the page and it went back to normal. image

elliotwaite commented 6 years ago

Hmm, maybe.

When not in the incognito window, would it happen every time you reloaded that page for that thumbnail, or only some of the times?

Liz-chan commented 6 years ago

Sorry if my edits were a bit confusing. When I said I refreshed the page I did it in the normal window, not the incognito one. I still have the same everything, so I don't know why it'd be different results.

EDIT: Now when I reload the page it parses them correctly, I don't know why the bug only shows up sometimes.

elliotwaite commented 6 years ago

Ah, ok. I'm about to head to bed, but I'll work on it more tomorrow. I'll try to add something in the next release that will make it easier to debug that issue when it happens, like some html tag data on the bar element that says which exact video ID the bar's data is for.

Liz-chan commented 6 years ago

Ah alright, sweet. If I encounter it again after that I'll let you know.

Liz-chan commented 6 years ago

Damn it happened again, that's a shame. Would it help if I included a local copy of the page with my comment? image image

EDIT: Disregard that, the local copy has no useful info from looking at it. EDIT2: Also another thing to note, that the only other extension that I have for YouTube is this. I don't think it would do anything though, since yours does something completely different. https://chrome.google.com/webstore/detail/iridium/gbjmgndncjkjfcnpfhgidhbgokofegbl

elliotwaite commented 6 years ago

Yeah, I think it's unlikely that the Iridium extension would affect the rating bars.

Yeah, there isn't much info on the page at the moment to debug the issue, but in the next update, probably released tomorrow, I'll add in all the hidden meta data tags. Then if you see it happen again, you can just do a right click on the page, and then click inspect to bring up the elements tab in the developers console, then copy the entire html element and then paste it here, and hopefully that will help with figuring out what is going on. I'll let you know when I release that update.

Also, thank you for taking the time to help me debug this. I appreciate it.

Liz-chan commented 6 years ago

Yea no problem, we have a similar goal, a bug-free extension 😄

elliotwaite commented 6 years ago

That is true.

elliotwaite commented 6 years ago

Ah, I figured out what is happening. On a page change, sometimes some of the thumbnail elements don't get completely recreated. Instead, their internal video data just gets swapped out. So the rating bar doesn't get deleted and it just displays the rating for the video previously in that spot.

Working on a fix.

Liz-chan commented 6 years ago

Oh sweet, glad you figured it out

elliotwaite commented 6 years ago

Just released an update that should have fixed the issue (0.0.25). I was able to predictably reproduce the problem while debugging it by simply doing 2 different searches then pressing the back and forward history buttons to navigate between those two pages. But yeah, should be fixed now.

Let me know if you notice it messing up at still.

Liz-chan commented 6 years ago

Thanks for taking the time to figure out the problem, and I'll let you know if I notice it again now. I just checked the version and it seems it already updated to .25, that was fast.

elliotwaite commented 6 years ago

Nice. I was wondering how long it takes for updates to get to the users. I guess it happens pretty quickly.

elliotwaite commented 6 years ago

I'm going to close this issue for now, but please reopen it if you ever notice it happening again.

Liz-chan commented 6 years ago

image image https://www.youtube.com/channel/UCf_67twWOb9eYH-HX562r6A/videos

It doesn't change when you refresh.

elliotwaite commented 6 years ago

Hmm, that's a strange one. The data returned by the YouTube Data API says that video has 67 dislikes.

{
 "kind": "youtube#videoListResponse",
 "etag": "\"DuHzAJ-eQIiCIp7p4ldoVcVAOeY/cmQM5MaVsgy_hu9deDiU8VUoimE\"",
 "pageInfo": {
  "totalResults": 1,
  "resultsPerPage": 1
 },
 "items": [
  {
   "kind": "youtube#video",
   "etag": "\"DuHzAJ-eQIiCIp7p4ldoVcVAOeY/Z-ivz1gfcn62KUm6pi9rIDp-IRg\"",
   "id": "Z_-XeSa9Fo0",
   "statistics": {
    "viewCount": "3713",
    "likeCount": "337",
    "dislikeCount": "67",
    "favoriteCount": "0",
    "commentCount": "139"
   }
  }
 ]
}

This might be a bug with the YouTube Data API. I created a new issue for it on Google's issue tracker: https://issuetracker.google.com/issues/111179602

We'll see what they say.

Gitoffthelawn commented 5 years ago

Any update on this?

elliotwaite commented 5 years ago

It looks like a Googler has been assigned to the issue in the bug tracker, but not sure if there's been any other progress yet. The issue can be tracked here: https://issuetracker.google.com/issues/111179602

elliotwaite commented 2 years ago

Since this extension no longer uses the YouTube Data API, I going to close this issue since it no longer applies. But thank you for reporting this issue.