Skip to content

[YouTube] Fix lockup metadata parsing for channels with non-standard metadata rows#1495

Closed
Ecomont wants to merge 1 commit into
TeamNewPipe:devfrom
Ecomont:fix/lockup-metadata-fallback
Closed

[YouTube] Fix lockup metadata parsing for channels with non-standard metadata rows#1495
Ecomont wants to merge 1 commit into
TeamNewPipe:devfrom
Ecomont:fix/lockup-metadata-fallback

Conversation

@Ecomont
Copy link
Copy Markdown
Contributor

@Ecomont Ecomont commented May 26, 2026

Fixes ParsingException / RegexException when loading subscription feeds for channels that return lockupViewModel items with non-standard metadata row: missing, section headers, or channel names instead of views/dates

Reported by @dftf-stu in TeamNewPipe/NewPipe#13540 with examples from affected channels

  • @jiggylookback (UCgYI5VzbdSNz8mZ9t9xaVeA)
    • Parser.RegexException: Failed to parse "Jiggylookback" as view count
  • @talktv (UCm0yTweyAa0PwEIp0l3N_gA)
    • ParsingException: Unable to parse date "Scheduled for 27/05/2026, 18:01"
  • @wildlifeaid (UC2GYlKSMFgAPqVZoFyw5Itg)
    • ParsingException: metadataRows path missing entirely

When findMetadataPartInRow() and findMetadataPartInAllRows() found nothing, these fallbacks grabbed whatever text was at the fixed position section headers, channel names, scheduled dates, or non-existent paths and tried to parse them, causing exceptions.

  • I carefully read the contribution guidelines and agree to them.
  • I have tested the API against NewPipe.
  • I agree to create a pull request for NewPipe as soon as possible to make it compatible with the changed API.

…xtraction

The metadataPart(infoRowIndex, 0) and metadataPart(infoRowIndex, 1) fallbacks
assumed fixed positions always contain view counts and dates. However,
YouTube's lockupViewModel format varies — channel tabs can have metadata rows
containing section headers, channel names, or other non-numeric text that
causes Parser.RegexException when parsed as a view count.

Remove these unsafe fallbacks. The predicate-based search
(findMetadataPartInRow + findMetadataPartInAllRows) is sufficient:
if no metadata part matches the views/date predicate, return safe defaults
(-1 or 0 for views, null for date) instead of crashing.
@sonarqubecloud
Copy link
Copy Markdown

@Ecomont Ecomont closed this May 26, 2026
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