[YouTube] Fix lockup metadata parsing for channels with non-standard metadata rows#1495
Closed
Ecomont wants to merge 1 commit into
Closed
[YouTube] Fix lockup metadata parsing for channels with non-standard metadata rows#1495Ecomont wants to merge 1 commit into
Ecomont wants to merge 1 commit into
Conversation
…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.
|
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.



Fixes
ParsingException/RegexExceptionwhen loading subscription feeds for channels that returnlockupViewModelitems with non-standard metadata row: missing, section headers, or channel names instead of views/datesReported by @dftf-stu in TeamNewPipe/NewPipe#13540 with examples from affected channels
UCgYI5VzbdSNz8mZ9t9xaVeA)Parser.RegexException: Failed to parse"Jiggylookback"as view countUCm0yTweyAa0PwEIp0l3N_gA)ParsingException: Unable to parse date"Scheduled for 27/05/2026, 18:01"UC2GYlKSMFgAPqVZoFyw5Itg)ParsingException:metadataRowspath missing entirelyWhen
findMetadataPartInRow()andfindMetadataPartInAllRows()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.