Skip to content

fix: map subtitle label field in protobuf bridge#110

Open
schobiDotDev wants to merge 1 commit intoStremio:masterfrom
schobiDotDev:fix/subtitle-label-bridge
Open

fix: map subtitle label field in protobuf bridge#110
schobiDotDev wants to merge 1 commit intoStremio:masterfrom
schobiDotDev:fix/subtitle-label-bridge

Conversation

@schobiDotDev
Copy link
Copy Markdown

Closes #109

Problem

stremio-core#947 (v0.55.0) added a label: Option<String> field to the Subtitles struct, allowing addons to provide custom display names for subtitle tracks. However, the protobuf bridge doesn't map this field, so Android/Android TV apps never receive it.

Currently, the protobuf name field (field 4) is populated with the addon name via addon_name.cloned(), not the subtitle's own label.

Changes

  1. subtitle.proto: Added optional string label = 5 to the Subtitle message
  2. subtitle.rs: Map Subtitles.label to the new protobuf label field in both ToProtobuf and FromProtobuf
  3. Cargo.lock: Updated stremio-core dependency from 9a827fdd to b5d3833f to pick up the label field on the Subtitles struct

The existing name field (field 4) is left unchanged - it continues to carry the addon name. The new label field (field 5) is additive and backward compatible.

Related

Android app follow-up

Once this bridge change is merged, the Android app's subtitle picker would need to prefer label over the resolved lang name for variant display. Since the app is closed source, this would be handled by the Stremio team.

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.

Subtitle label field not mapped in protobuf bridge

1 participant