Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

[FIX] Handle Text tracks without an ID in the MediaInfo parser - #1291

Open
Anurag1428 wants to merge 1 commit into
CCExtractor:masterfrom
Anurag1428:fix/text-track-without-id-1290
Open

Anurag1428 wants to merge 1 commit into
CCExtractor:masterfrom
Anurag1428:fix/text-track-without-id-1290

Conversation

@Anurag1428

@Anurag1428 Anurag1428 commented Nov 27, 2026 •

Copy link
Copy Markdown

Closes #1290

In raising this pull request, I confirm the following (please check boxes):

  • I have read and understood the contributors guide.
  • I have checked that another pull request for this purpose does not exist.
  • I have considered, and confirmed that this submission will be valuable to others.
  • I accept that this submission may not be used, and the pull request closed at the will of the maintainer.
  • I give this submission freely, and claim no ownership to its content.

My familiarity with the project is as follows (check one):

  • I have never used the project.
  • I have used the project briefly.
  • I have used the project extensively, but have not contributed previously.
  • I am an active contributor to the project.

Cause: MediaInfoFetcher._process_text built the track name from track['ID'] unconditionally. MediaInfo gives no stream ID for a standalone SubRip file, so the parser raised KeyError: 'ID'.

Change: _process_text now uses ID: <id> when the track has an ID (unchanged, as for the MKV case) and falls back to Stream nr. <n> otherwise, the same fallback _process_video already uses.

Tests: added test__process_text_without_id, which fails on master with KeyError: 'ID' and passes with this change.

@sonarqubecloud

Copy link
Copy Markdown

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.

[BUG] Standalone SubRip metadata raises KeyError when the Text track has no ID

1 participant