Skip to content
This repository was archived by the owner on Oct 26, 2024. It is now read-only.

ReturnYouTubeDislike - handle if YouTube video owner set video likes to hidden#224

Merged
oSumAtrIX merged 85 commits into
ReVanced:mainfrom
LisoUseInAIKyrios:main
Nov 30, 2022
Merged

ReturnYouTubeDislike - handle if YouTube video owner set video likes to hidden#224
oSumAtrIX merged 85 commits into
ReVanced:mainfrom
LisoUseInAIKyrios:main

Conversation

@LisoUseInAIKyrios

@LisoUseInAIKyrios LisoUseInAIKyrios commented Nov 29, 2022

Copy link
Copy Markdown

RYD API does not collect or provide data for videos where the creator has enabled hiding the like count.

Example video: https://www.youtube.com/watch?v=UnrU5vxCHxw
RYD data: https://returnyoutubedislikeapi.com/votes?videoId=UnrU5vxCHxw

As per: Anarios/return-youtube-dislike#530
Do not show a dislike count for these type of videos, as no dislike data is available.

Other code changes include:

  • use HTTP request headers as specified by RYD API
  • added a thread pool executor (video UI seems to load a little faster since UI does not wait for a resource heavy thread to create and start)
  • simplified ReturnYouTubdeDislike fetch code using a Future object
  • removing the non-functional interrupt logic (If the calling thread is interrupted, HttpURLConnection continues to run and does not halt or throw an exception). Interrupting is not needed anyways since the timeout is so short.
  • voting runs on a single thread executor (removes the need to synchronize voting/registration)
  • reduced UI blocking timeout to 4 seconds (with 5 seconds it could still trigger an Android "App Not Responding" message)

I've been using this for a few days and it's working well for me.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants