Skip to content

fix: Correct metadata parsing for forced playback speed#3836

Open
hkzo wants to merge 1 commit into
code-charity:masterfrom
hkzo:fix/forced-playback-speed-regex
Open

fix: Correct metadata parsing for forced playback speed#3836
hkzo wants to merge 1 commit into
code-charity:masterfrom
hkzo:fix/forced-playback-speed-regex

Conversation

@hkzo
Copy link
Copy Markdown

@hkzo hkzo commented May 6, 2026

Summary

This PR fixes metadata extraction in ImprovedTube.playerPlaybackSpeed() when "Permanent/Forced playback speed" is enabled and the playback speed is set above 1.

Video title changes were not always detected correctly because fetched metadata was parsed with a faulty regex.

Details

Fixed an issue where video title changes were not being correctly detected due to a faulty regex.

The subsequent logic expects property/value in match[1] and match[2], but the current regex captures them into match[2] and match[3]. This mismatch causes if (keywords) { ImprovedTube.speedException(); } to always evaluate to false, preventing music video detection.

Additionally, the code failed to extract the title from fetched content, leading to evaluations based on outdated metadata from the previous video.

Changes:

  • Exclude (name|itemprop) from capture groups to fix an index mismatch for property and value.
  • Update regex to match <meat name="title"> for extracting DATA.title from the fetched content.
  • Fixes the bug where ImprovedTube.speedException() is never triggered due to failed keyword retrieval.

Environment

  • Browser: Firefox Developer Edition 151 / Firefox 150
  • Extension: ImprovedTube 4.2026 (No other extensions installed)
  • OS: macOS 15.7

Fix an issue where ImprovedTube.speedException() is never called due to incorrect keyword retrieval.
Exclude (name|itemprop) from capture groups to fix an index mismatch for property and value.

Fix missing title updates from fetched content that cause the title to remain empty or outdated.
Update regex to match "title" for extracting DATA.title from the fetched content.
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.

1 participant