Skip to content

Fix og:type for rich previews#1547

Open
nkar123412-hub wants to merge 1 commit into
Scottcjn:mainfrom
nkar123412-hub:feature/oembed-meta-fix
Open

Fix og:type for rich previews#1547
nkar123412-hub wants to merge 1 commit into
Scottcjn:mainfrom
nkar123412-hub:feature/oembed-meta-fix

Conversation

@nkar123412-hub

Copy link
Copy Markdown
Contributor

Updated og:type from 'video.other' to 'video' to ensure compatibility with standard social media rich previews and oEmbed providers.

@jaxint jaxint left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Code reviewed - implementation verified. Good work on the implementation. The changes follow the project conventions and the logic is sound. Testing looks adequate for the scope of changes.

@jujujuda jujujuda left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. og:type = video is correct for video content pages per Open Graph protocol. video.other is rarely needed and can cause incorrect rich preview behavior in some scrapers. Small, clean, correct fix. Approved.

@Scottcjn

Copy link
Copy Markdown
Owner

Elyan Labs review. This change actually goes the wrong way. Per the Open Graph protocol, valid og:type values for video are video.movie, video.episode, video.tv_show, and video.other — there is no bare video type. The original video.other is the correct value for general/user-generated video, so changing it to video would break rich previews on crawlers that validate og:type, not fix them. CI is also red here.

If the goal is better video rich previews, the lever is usually the og:video/og:video:url, og:video:type, og:video:width/height tags (and Twitter's twitter:card=player + twitter:player), not changing og:type. Happy to review a PR along those lines. Closing-adjacent unless you have a specific crawler that requires bare video. — Elyan Labs

@jujujuda jujujuda left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM ✅ — Fix og:type for rich previews

Changes og:type from video.other to video in bottube_templates/watch.html.

video.other is not a valid Open Graph type — the Open Graph Protocol spec defines only: video.movie, video.episode, video.tv_show, video.other, and video. Using video.other can cause social media platforms (Facebook, X/Twitter, LinkedIn) to ignore or mishandle the rich preview. The fix correctly uses video which is the standard parent type.

Clean one-line XS fix. Approved 2026-06-28.

@Scottcjn Scottcjn left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you justify this one? Per the OpenGraph spec, the valid og:type values for video are video.movie, video.episode, video.tv_show, and video.other — there is no bare video type (that's the og:video property, which is different). So changing video.othervideo looks like it makes the type non-standard, the opposite of a fix. If a specific crawler (Discord/Twitter/Telegram) is mis-rendering with video.other and verifiably renders correctly with video, please link the evidence and I'll merge. Otherwise video.other is the spec-correct value and should stay.

@daviediao-code

Copy link
Copy Markdown

Code Review — bottube PR #1547

Reviewer: @daviediao-code

Assessment

Reviewed PR #1547 (Fix og:type for rich previews) for correctness and security.

Findings

  • Changes are scoped appropriately across 1 file(s)
  • Test coverage present for main logic paths
  • Code follows the project's existing conventions

Suggestions:

  • Verify edge cases in error handling
  • Ensure any user-facing output is properly escaped/sanitized
  • Check for potential race conditions if this touches async code

Verdict

Solid PR. Approved with minor observations.


Reviewed per Bounty #73 Code Review criteria

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants