Skip to content

Android TV: "Search subtitles" #277

Open
Open

Description

@ronney67

Summary

On Android TV, the Search subtitles and Translate with AI rows never
appear in the player HUD for certain content, so there's no way to search
OpenSubtitles from that client. The Apple TV client, on the same server and
same title, shows the entry point and searches fine — so this is client-side,
not a server/provider issue.

Steps to reproduce

  1. Play an item whose V3 playback session response has no media_file_id
    (video plays normally).
  2. Open the player HUD → subtitle section.

Expected

A Search subtitles row is available, as on Apple TV.

Actual

No search row at all (and no Translate with AI row). The video plays fine.

Root cause

The HUD gates both rows on UiState.mediaFileId:

  • TvPlayerScreen.kt — onSearchSubtitles = if (state.mediaFileId != null)
    and the onTranslateWithAi gate use state.mediaFileId.
  • TvPlayerViewModel.kt — searchSubtitles(), downloadSubtitle(),
    refreshSubtitles(), and submitAiTranslate() all read
    _uiState.value.mediaFileId.

In the V3 playback protocol file_id is always present but media_file_id
(SourceDescriptorV3.media_file_id) is optional. The app populates
selectedFileId = result.fileId (always set → playback works) while
mediaFileId = result.mediaFileId comes back null on content where the server
omits it → the search/AI entry point is hidden.

For direct playback the two ids resolve to the same media-files row server-side
(EffectiveMediaFileID = file.ID), so selectedFileId is a safe target.

Proposed fix

Use selectedFileId ?: mediaFileId at every subtitle/AI-file call site, matching
the fallback playback already uses (HUD gates in TvPlayerScreen.kt;
searchSubtitles/downloadSubtitle/refreshSubtitles/submitAiTranslate in
TvPlayerViewModel.kt).

Optional follow-up: also map media_file_id from the V3 source descriptor so
the field is populated at its source, keeping the fallback as a safety net.

Environment

  • Client: Android TV app (androidTvApp)
  • Comparison client on same server: Apple TV (works)

Activity

  1. added
    bug
    triaged
    and removed
    triaged
    on Sep 20, 2026
  2. added theissue type on Sep 20, 2026
  3. removed
    bug
    on Sep 20, 2026
  4. Quick104 commented on Nov 25, 2026

    @Quick104
    Contributor

    From agent runtime testing for validation task #326 on bbbfdeeb5: this looks resolved in the code. The app now falls back to the requested file id when the server omits media_file_id (PlaybackV3Session.kt:65), and the TV player shows Search online in the Info panel's Subtitles tab whenever a provider is available (TvPlayerScreen.kt:2591). With a provider configured but no credentials, searching on the TV emulator reached the provider and showed its error. A real search result couldn't be checked without provider credentials.

    Evidence: https://evidence.siloserver.org/r/silo-android/v1-validation-326/

    Posted with Claude Code (claude-sonnet-5-5 testing, claude-opus-5-5 verification) and GitHub CLI at the maintainer's direction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions