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:
parent
be865fa992
commit
43c168da95
35 changed files with 1771 additions and 327 deletions
|
|
@ -1,11 +1,13 @@
|
|||
import { useEffect, useState } from 'react';
|
||||
import { useSettings, QUALITY_LABEL, type Quality, type SkipMode, type SubtitleMode } from '../../app/settings';
|
||||
import { useSettings, QUALITY_LABEL, SUBTITLE_COLORS, SUBTITLE_MARGIN, type Preferences, type Quality, type SkipMode, type SubtitleBox, type SubtitleEdge, type SubtitleMode, type SubtitlePosition } from '../../app/settings';
|
||||
import { useSession } from '../../app/session';
|
||||
import { useSections } from '../../app/queries';
|
||||
import { useSections, useServerQuery } from '../../app/queries';
|
||||
import * as api from '../../plex/api';
|
||||
import { art } from '../../app/format';
|
||||
import { useDownloads } from '../../downloads/store';
|
||||
import { appInfo, isNative, openExternal, pickFolder, revealPath, type AppInfo } from '../../platform/native';
|
||||
import { checkForUpdate, installUpdate, useUpdater } from '../../app/updater';
|
||||
import { Button, Select, Switch } from '../../ui/primitives';
|
||||
import { Button, Segmented, Select, Switch } from '../../ui/primitives';
|
||||
import { confirmDialog } from '../../ui/overlays';
|
||||
import { Pref, SettingsSection } from './parts';
|
||||
import { KaleidoMark } from '../../ui/primitives';
|
||||
|
|
@ -61,10 +63,45 @@ const SHORTCUTS: [string, string][][] = [
|
|||
['C', 'Next subtitle track'],
|
||||
['Shift + N', 'Next episode'],
|
||||
['0–9', 'Jump to 0–90%'],
|
||||
['Esc', 'Exit full screen, then the player'],
|
||||
['Esc or Backspace', 'Exit full screen, then keep playing in the corner'],
|
||||
],
|
||||
];
|
||||
|
||||
/**
|
||||
* A frame from the library with a sample line drawn the way mpv will draw it:
|
||||
* sizes are in mpv's scaled pixels, where the frame height is 720.
|
||||
*/
|
||||
function SubtitlePreview({ prefs }: { prefs: Preferences }) {
|
||||
const session = useSession();
|
||||
const cw = useServerQuery(['continue'], (srv) => api.continueWatching(srv), { enabled: !!session.server, staleTime: 15_000 });
|
||||
const still = cw.data?.find((i) => art.backdrop(i));
|
||||
const px = (n: number) => `calc(${n} / 720 * 100cqh)`;
|
||||
const edge = prefs.subtitleBox === 'none' ? prefs.subtitleEdge : 'none';
|
||||
const outline = edge === 'outline' ? 1.8 : edge === 'raised' ? 1.3 : 0;
|
||||
const shadow = edge === 'shadow' ? 2.2 : edge === 'raised' ? 1.6 : 0;
|
||||
return (
|
||||
<div className="subtitle-preview">
|
||||
{still && session.server && <img src={session.server.image(art.backdrop(still), 960, 540)} alt="" draggable={false} />}
|
||||
<div className="subtitle-preview-line" style={{ bottom: px(SUBTITLE_MARGIN[prefs.subtitlePosition]) }}>
|
||||
<span
|
||||
className={prefs.subtitleBox}
|
||||
style={{
|
||||
color: prefs.subtitleColor,
|
||||
fontSize: px(38 * prefs.subtitleScale),
|
||||
fontWeight: prefs.subtitleBold ? 700 : 400,
|
||||
WebkitTextStroke: outline ? `${px(outline * 2)} #000` : undefined,
|
||||
textShadow: shadow ? `${px(shadow)} ${px(shadow)} 0 rgba(0, 0, 0, 0.7)` : undefined,
|
||||
}}
|
||||
>
|
||||
The night is darkest just before the dawn.
|
||||
<br />
|
||||
And I promise you, the dawn is coming.
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export function AppSettings({ tab }: { tab: string }) {
|
||||
const s = useSettings();
|
||||
const set = s.set;
|
||||
|
|
@ -190,6 +227,9 @@ export function AppSettings({ tab }: { tab: string }) {
|
|||
<Pref label="Subtitle language" description="Automatic uses the language of the audio track.">
|
||||
<Select value={s.subtitleLanguage} onChange={(v) => set('subtitleLanguage', v)} options={LANGUAGES.map(([value, label]) => ({ value, label }))} />
|
||||
</Pref>
|
||||
</SettingsSection>
|
||||
<SettingsSection title="Subtitle style" description="How text subtitles look. Image subtitles (Blu-ray, DVD) and styled ASS subtitles keep their own look. Changes apply to a playing video straight away.">
|
||||
<SubtitlePreview prefs={s} />
|
||||
<Pref label="Size">
|
||||
<Select
|
||||
value={s.subtitleScale}
|
||||
|
|
@ -202,8 +242,58 @@ export function AppSettings({ tab }: { tab: string }) {
|
|||
]}
|
||||
/>
|
||||
</Pref>
|
||||
<Pref label="Background box" description="Draws text subtitles on a dark box for contrast.">
|
||||
<Switch checked={s.subtitleBackground} onChange={(v) => set('subtitleBackground', v)} />
|
||||
<Pref label="Text colour">
|
||||
<div className="swatches" role="radiogroup" aria-label="Text colour">
|
||||
{SUBTITLE_COLORS.map((c) => (
|
||||
<button
|
||||
key={c.value}
|
||||
role="radio"
|
||||
aria-checked={s.subtitleColor === c.value}
|
||||
aria-label={c.label}
|
||||
title={c.label}
|
||||
className={s.subtitleColor === c.value ? 'selected' : ''}
|
||||
style={{ background: c.value }}
|
||||
onClick={() => set('subtitleColor', c.value)}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
</Pref>
|
||||
<Pref label="Edge">
|
||||
<Segmented<SubtitleEdge>
|
||||
value={s.subtitleEdge}
|
||||
onChange={(v) => set('subtitleEdge', v)}
|
||||
options={[
|
||||
{ value: 'outline', label: 'Outline' },
|
||||
{ value: 'shadow', label: 'Shadow' },
|
||||
{ value: 'raised', label: 'Both' },
|
||||
{ value: 'none', label: 'None' },
|
||||
]}
|
||||
/>
|
||||
</Pref>
|
||||
<Pref label="Background">
|
||||
<Segmented<SubtitleBox>
|
||||
value={s.subtitleBox}
|
||||
onChange={(v) => set('subtitleBox', v)}
|
||||
options={[
|
||||
{ value: 'none', label: 'None' },
|
||||
{ value: 'translucent', label: 'Translucent' },
|
||||
{ value: 'solid', label: 'Solid' },
|
||||
]}
|
||||
/>
|
||||
</Pref>
|
||||
<Pref label="Bold">
|
||||
<Switch checked={s.subtitleBold} onChange={(v) => set('subtitleBold', v)} />
|
||||
</Pref>
|
||||
<Pref label="Position">
|
||||
<Segmented<SubtitlePosition>
|
||||
value={s.subtitlePosition}
|
||||
onChange={(v) => set('subtitlePosition', v)}
|
||||
options={[
|
||||
{ value: 'low', label: 'Low' },
|
||||
{ value: 'normal', label: 'Normal' },
|
||||
{ value: 'high', label: 'Raised' },
|
||||
]}
|
||||
/>
|
||||
</Pref>
|
||||
</SettingsSection>
|
||||
</>
|
||||
|
|
@ -214,7 +304,7 @@ export function AppSettings({ tab }: { tab: string }) {
|
|||
<Pref label="Artwork colour wash" description="Tints pages with colors from the title’s artwork.">
|
||||
<Switch checked={s.colorWash} onChange={(v) => set('colorWash', v)} />
|
||||
</Pref>
|
||||
<Pref label="Rotate featured titles" description="Cycles the featured title on Home and Discover every 12 seconds.">
|
||||
<Pref label="Rotate featured titles" description="Cycles the featured title on Home and Discover every 8 seconds.">
|
||||
<Switch checked={s.heroRotation} onChange={(v) => set('heroRotation', v)} />
|
||||
</Pref>
|
||||
<Pref label="Poster size" description="Card size in library grids.">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue