Conversation
…I, using the thumbnail API
Owner
|
Hi! Besides that, it'd be much better if you refactored your changes so that it won't use a failed request's response as if it succeeded, that's asking for trouble! Something like the following would be much more robust const res = await fetch(normalApi);
if (res.ok) {
// existing code ...
} else if (settings.store.useAutomaticThumbnails) {
const res = await fetch(thumbnailApi);
// ...
}Besides that I do like this idea, so thank you! |
| description: "Makes YouTube embed titles and thumbnails less sensationalist, powered by Dearrow", | ||
| authors: [Devs.Ven], | ||
| authors: [Devs.Ven, { | ||
| name: "ichi0995", |
Contributor
There was a problem hiding this comment.
You should add yourself to the devs export like how devs.ven is
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Hello,
I noticed that the Dearrow plugin does not properly work when the API for Dearrow throws a 404 error, even when the embedded link is indeed a Youtube video. Hence I am proposing this change: if no title nor thumbnail is provided by the main API, the thumbnail API is used instead, which should provide a response for all YouTube videos unless the API is down.