Skip to content

feat(details): synopsis and cast on long press - #419

Open
Pierroons wants to merge 3 commits into
oxyroid:masterfrom
Pierroons:feat/channel-detail-sheet
Open

feat(details): synopsis and cast on long press#419
Pierroons wants to merge 3 commits into
oxyroid:masterfrom
Pierroons:feat/channel-detail-sheet

Conversation

@Pierroons

Copy link
Copy Markdown
Contributor

First half of #418, split as you asked. Search by cast follows separately.

Long-pressing a channel opens a sheet with Favourite, Hide and Create shortcut, and says nothing about the title itself. This adds the synopsis, cast, director, genre, year and rating.

Xtream keeps that out of the catalogue: get_vod_streams returns names and artwork only, so each description costs its own get_vod_info call (~0.21 s measured). Series answer the same shape on get_series_info. It's fetched when the sheet opens, not up front — tapping a channel still plays it immediately.

Cache. Keyed on (playlist_url, relation_id), not the channel row id: ids are regenerated on every re-subscription, which is the only way to refresh a catalogue, so keying on them would discard everything each time.

No foreign key on the table, deliberately. Re-subscribing writes the playlist back with INSERT OR REPLACE, which SQLite performs as delete-then-insert — an ON DELETE CASCADE empties the cache on every refresh. Measured before catching it: 401 rows before, 0 after. Rows are deleted explicitly on unsubscribe instead.

Requests are serialised behind a mutex. These accounts commonly allow a single connection and it is shared with playback; several descriptions fetched at once can cost the viewer their stream. A row is written even when the panel has nothing to say, so "asked, has nothing" stays distinct from "never asked".

The parser submodule is untouched — only its URL builder is reused, so this stays a single-repository change.

Five tests pin down the payload shapes, since panels disagree on their own field types: rating arrives as 5, "5" and 7.4, tmdb_id alternates between number and string, movies say releasedate where series say releaseDate. data/.gitignore excluded /src/test, so the module could not carry unit tests at all; that entry is dropped.

Verified on device against a 22 822 film / 5 332 series catalogue: long press shows year, genre, rating, cast, director and synopsis, and the cache survives a full refresh intact.

Pierroons and others added 3 commits August 9, 2026 12:24
Long-pressing a channel opened a sheet offering Favourite, Hide and Create
shortcut, and said nothing about the title itself. Other clients show a
synopsis and a cast there.

Xtream keeps that apart from the catalogue: get_vod_streams returns names
and artwork only, so each description costs a get_vod_info call — which is
why it is fetched when the sheet opens rather than up front. Series answer
the same shape on get_series_info.

Tapping a channel still plays it immediately. The description sits behind a
long press so nothing is added between a viewer and their film.

Details are cached in channel_details, keyed on (playlist, channel
reference) rather than on the channel row id: ids are regenerated on every
re-subscription, which is the only way to refresh a catalogue, so keying on
them would discard the cache each time.

Requests are serialised behind a mutex. These accounts commonly allow a
single connection and it is shared with playback — several descriptions
fetched at once can cost the viewer their stream.

A row is written even when the panel has nothing to say, so "asked, has no
description" stays distinguishable from "never asked" and the sheet does
not re-ask on every open.

The call is issued from this module rather than from the parser submodule,
which models the episode list of get_series_info but not the descriptive
block. Only its URL builder is reused, so this stays a single-repository
change.

Panels disagree on their own field types — rating arrives as 5, "5" and
7.4, tmdb_id alternates just as freely, movies say releasedate where series
say releaseDate. A lenient reader keeps a sheet from being lost over a
field nobody reads as a number; five tests pin those shapes down.

Verified on device: long press on a film shows 2017 · Action,
Science-Fiction, Thriller ★ 5.6, its cast, its director and its synopsis,
and the row lands in the cache with the folded cast ready for search.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
data/.gitignore excluded /src/test, so the module could not carry unit tests
at all. The entry is dropped and five come with it.

They cover what panels actually send: a rating as a bare number, tmdb_id
alternating between number and string, movies spelling releasedate where
series spell releaseDate, cast falling back to actors, plot to description,
and unknown fields appearing without warning. Any of those refused outright
would cost the sheet its content.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
… method

The instrumented test was left behind: PlaylistRepositoryImpl gained a
channelDetailsDao parameter and XtreamParser gained getChannelDetailsOrNull,
and the test's fake parser implemented neither. CI caught it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.

1 participant