Address the first beta's bugs and requested changes

Startup now uses the Android iris animation, and playback can continue
in a corner miniplayer while browsing (the video is drawn into a corner
rectangle beneath a matching hole in the page). The player keeps the
window controls, hides its chrome when the pointer leaves, and gains
audio/subtitle tracks, audio sync, source bitrate and playback details
in its options. Subtitles can be styled in Settings with a live preview.
Categories replace Collections, the A–Z rail magnifies, descriptions
expand in place, downloads can be removed in bulk, and search keeps its
results while typing.

Fixes scroll jank from per-card and scrolling backdrop blurs, the hidden
colour wash, the cubic volume curve, loud theme music, the search focus
ring, a stray nav indicator, Continue Watching previews and the TV Shows
header overlap. Removes the star rating, the duplicate Settings menu
entry and the server settings' Show advanced switch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Elijah 2026-10-30 18:06:54 -07:00
parent be865fa992
commit 43c168da95
35 changed files with 1771 additions and 327 deletions

View file

@ -1,19 +1,22 @@
import { useMemo } from 'react';
import * as api from '../plex/api';
import { useSectionFor, useServerQuery } from '../app/queries';
import { navigate, type SectionKind, type SectionTab } from '../app/router';
import { navigate, useRouter, type SectionKind, type SectionTab } from '../app/router';
import { useSettings } from '../app/settings';
import type { Section } from '../plex/types';
import { Hero } from '../ui/Hero';
import { HubShelf, PosterCard } from '../ui/media';
import { EmptyState, ErrorState, PageLoader, Select } from '../ui/primitives';
import { HubShelf } from '../ui/media';
import { useServer } from '../app/session';
import { Icon } from '../ui/Icon';
import { categoryArtwork } from './categories';
import { Artwork, EmptyState, ErrorState, PageLoader, Select } from '../ui/primitives';
import { buildFeatures, HIDDEN_HUBS, recentSeasons } from './discover';
import { LibraryBrowser } from './LibraryBrowser';
const TABS: { id: SectionTab; label: string }[] = [
{ id: 'discover', label: 'Discover' },
{ id: 'library', label: 'Library' },
{ id: 'collections', label: 'Collections' },
{ id: 'categories', label: 'Categories' },
];
function SectionHeader({ kind, tab, section, all, overlay }: { kind: SectionKind; tab: SectionTab; section: Section; all: Section[]; overlay: boolean }) {
@ -67,29 +70,65 @@ function Discover({ kind, section }: { kind: SectionKind; section: Section }) {
);
}
function Collections({ section }: { section: Section }) {
const q = useServerQuery(['collections', section.id], (s) => api.collections(s, section.id));
if (q.isError) return <ErrorState error={q.error} onRetry={() => q.refetch()} />;
if (!q.data) return <PageLoader />;
if (!q.data.length)
/** Genres as artwork tiles, as on Kaleido for TV; each opens the library filtered to it. */
function Categories({ kind, section }: { kind: SectionKind; section: Section }) {
const server = useServer();
const type = kind === 'movie' ? 1 : 2;
const genres = useServerQuery(['genres', section.id, type], (s) => api.genres(s, section.id, type), { staleTime: 30 * 60_000 });
const artwork = useServerQuery(['categoryArtwork', section.id, type, genres.data?.map((g) => g.key).join(',')], (s) => categoryArtwork(s, section.id, type, genres.data ?? []), {
enabled: !!genres.data?.length,
staleTime: 30 * 60_000,
});
if (genres.isError) return <ErrorState error={genres.error} onRetry={() => genres.refetch()} />;
if (!genres.data) return <PageLoader />;
if (!genres.data.length)
return (
<EmptyState icon="collection" title="No collections yet">
Collections created in Plex for {section.title} appear here.
<EmptyState icon="grid" title="No categories">
{section.title} has no genres yet.
</EmptyState>
);
return (
<div className="page-pad">
<div className="grid-count">{q.data.length.toLocaleString()} collections</div>
<div className="poster-grid auto">
{q.data.map((c) => (
<PosterCard key={c.id} item={c} />
))}
<div className="category-grid">
{genres.data.map((g) => {
const path = artwork.data?.[g.key];
return (
<button key={g.key} className="category-tile" onClick={() => navigate({ name: 'section', kind, tab: 'categories', genre: g.key, genreTitle: g.title })}>
{path && <Artwork src={server.image(path, 540, 304)} />}
<span className="category-scrim" />
<span className="category-title">{g.title}</span>
</button>
);
})}
</div>
</div>
);
}
export function SectionScreen({ kind, tab }: { kind: SectionKind; tab: SectionTab }) {
/** Back to the grid: pop the history entry when that's where the genre was opened from. */
function backToCategories(kind: SectionKind) {
const { entries, index, back } = useRouter.getState();
const prev = entries[index - 1]?.route;
if (prev?.name === 'section' && prev.tab === 'categories' && !prev.genre) back();
else navigate({ name: 'section', kind, tab: 'categories' }, { replace: true });
}
function CategoryLibrary({ kind, section, genre, title }: { kind: SectionKind; section: Section; genre: string; title: string }) {
return (
<>
<div className="category-head">
<button className="category-back" onClick={() => backToCategories(kind)}>
<Icon name="back" size={16} />
Categories
</button>
<h2>{title}</h2>
</div>
<LibraryBrowser section={section} kind={kind} lockedFilters={{ genre }} />
</>
);
}
export function SectionScreen({ kind, tab, genre, genreTitle }: { kind: SectionKind; tab: SectionTab; genre?: string; genreTitle?: string }) {
const { section, all, loading } = useSectionFor(kind);
if (loading) return <PageLoader />;
if (!section)
@ -105,7 +144,7 @@ export function SectionScreen({ kind, tab }: { kind: SectionKind; tab: SectionTa
<SectionHeader kind={kind} tab={tab} section={section} all={all} overlay={tab === 'discover'} />
{tab === 'discover' && <Discover kind={kind} section={section} />}
{tab === 'library' && <LibraryBrowser section={section} kind={kind} />}
{tab === 'collections' && <Collections section={section} />}
{tab === 'categories' && (genre ? <CategoryLibrary kind={kind} section={section} genre={genre} title={genreTitle ?? ''} /> : <Categories kind={kind} section={section} />)}
</div>
);
}