Add invidious fallback for likes #4464
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add invidious fallback for likes
Pull Request Type
Description
youtubei.js is just not returning video likes for me, this however is not treated as an error, so I was just getting likes of 0. Invidious however was giving me video likes. I added a fallback where if the likes are not found I ask Invidious for them. I also moved the fetch likes code to the bottom of the try/catch in case something else above throws, since this would also fetch likes from invidious, so it avoids having to make two fetches.
I also removed any reference to youtube dislikes form the file since its no longer relevant
Desktop
Additional context
Is anyone else having issues with the likes not loading on any videos? Maybe youtube is trying to block likes for people that are not logged in? I've attempted to update youtubei and tried with/without my VPN and its always undefined. If this is just a me issue it might not be worth merging.