OpenSubtitles downloads arrive with no format and fail conversion #272

Closed
opened 2026-08-31 10:09:20 +01:00 by naps62-yolo · 0 comments
Owner

A download fails with:

4073669 could not be converted from  to SRT: no parser for ""

Search entries frequently carry no format attribute. format_of(None) returns SubtitleFormat::Other(""), that value is stashed in CandidateMeta at search time and handed back as the Fetched format, and convert then has no parser to pick.

The API converts on its side when the download request asks it to. POST /download takes sub_format, so sending {"file_id": ..., "sub_format": "srt"} makes the answer SRT unconditionally and the guessed-from-search format becomes dead weight.

The download mock matched only file_id, so it never exercised the format the real API returns.

Found while fixing #271.

A download fails with: ``` 4073669 could not be converted from to SRT: no parser for "" ``` Search entries frequently carry no `format` attribute. `format_of(None)` returns `SubtitleFormat::Other("")`, that value is stashed in `CandidateMeta` at search time and handed back as the `Fetched` format, and `convert` then has no parser to pick. The API converts on its side when the download request asks it to. `POST /download` takes `sub_format`, so sending `{"file_id": ..., "sub_format": "srt"}` makes the answer SRT unconditionally and the guessed-from-search format becomes dead weight. The download mock matched only `file_id`, so it never exercised the format the real API returns. Found while fixing #271.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: yolo/arr#272