Skip to content

[xExtension-YouTube] Add an option to disable embedding videos - #557

Merged
Alkarex merged 2 commits into
FreshRSS:mainfrom
NopeCharon:youtube-disable-embed
Oct 23, 2026
Merged

Alkarex merged 2 commits into
FreshRSS:mainfrom
NopeCharon:youtube-disable-embed

Conversation

@NopeCharon

Copy link
Copy Markdown
Contributor

Summary

  • add an Embed videos in articles checkbox to the YouTube extension configuration (yt_embed_videos user attribute)
  • when unchecked, the entry_before_display hook leaves YouTube and PeerTube entries untouched, while the other features (channel icons, channel/user URL to feed URL conversion) keep working
  • the option defaults to enabled when unset, so existing installations keep their current behaviour
  • add translations for all supported languages (de, en, fr, pl, tr)
  • bump the extension version to 1.4.0 and add a changelog entry

Fixes #517

Behavior

yt_embed_videos YouTube / Shorts / PeerTube entries
unset (existing users) player embedded (unchanged)
checked player embedded
unchecked original feed content displayed

Validation

  • ran the extension against FreshRSS edge with a real FreshRSS_UserConfiguration: checked embedYouTubeVideo() for watch?v=, shorts/ and PeerTube links with the setting unset / true / false, rendered configure.phtml (checkbox checked by default and when enabled, unchecked when disabled), and saved the form through handleConfigureAction() with and without the checkbox
  • composer run-script php-lint, composer run-script phtml-lint, phpcs, phpstan (with ../FreshRSS)
  • markdownlint-cli2 on the README

Note: #556 also bumps the YouTube extension version, so whichever is merged second will need a trivial rebase of metadata.json / the changelog, which I will take care of.

Some users enable the extension only for its other features, such as
automatically using the channels' icons or converting channel and user
URLs to feed URLs, and prefer to keep the original feed content instead
of an embedded player.

Add an "Embed videos in articles" checkbox to the configuration page,
stored in the `yt_embed_videos` user attribute. When it is unchecked,
the `entry_before_display` hook leaves YouTube and PeerTube entries
untouched. The option defaults to enabled when the attribute is unset,
so existing installations keep their current behaviour.

Add translations for all supported languages and bump the extension
version to 1.4.0.

Fixes FreshRSS#517
@Inverle Inverle added the xExtension-YouTube xExtension-YouTube label Oct 23, 2026
@Alkarex

Alkarex commented Oct 23, 2026

Copy link
Copy Markdown
Member

Thanks. And indeed there are a couple of merge conflicts. Please fix (you can just continue pushing to the same branch; no git rewrite needed)

Signed-off-by: NopeCharon <115794254+NopeCharon@users.noreply.github.com>

# Conflicts:
#	xExtension-YouTube/README.md
#	xExtension-YouTube/metadata.json
@NopeCharon

Copy link
Copy Markdown
Contributor Author

Merged main into the branch and fixed the conflicts, keeping version 1.4.0 with the 1.3.2 changelog entry below it.

@Alkarex
Alkarex merged commit 7ff9991 into FreshRSS:main Oct 23, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

xExtension-YouTube xExtension-YouTube

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] Disable embed videos in the xExtension-YouTube

3 participants