Fix playback, account, download and library bugs found in review
All checks were successful
Validate Kaleido Desktop / validate (push) Successful in 1m22s
All checks were successful
Validate Kaleido Desktop / validate (push) Successful in 1m22s
- Clear cached library data when the account or profile behind the server connection changes, not only on Home user switches. - TitleArt falls back to the title when there is no server, so the player no longer crashes offline. - Playback keeps the server it started on: progress, watched state and transcodes never go to a server selected later, a download only reports to its own server, and switching account or server ends a stream from the old one. - Closing or replacing playback during setup can no longer start the file afterwards. - Transcodes save the chosen audio/subtitle tracks on the server before starting (and name them in the request), apply the language and subtitle preferences, and keep the current tracks across quality changes. - Offline playback saves its resume point and watched count in the download's metadata. - Download tasks take over from a previous task for the same title only after it exits, and pause/remove stay wired to the current task. - Downloads prefer a single-file version and refuse split ones instead of saving only part one. - Download artwork is named per file, so episodes in one season folder no longer overwrite or delete each other's images. - Library grids refetch loaded pages when the cache is invalidated. - Request timeouts and cancellation also cover the response body. - Hero rotation resumes after being scrolled back into view. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
c70aeede74
commit
8755d16735
9 changed files with 399 additions and 99 deletions
|
|
@ -43,14 +43,14 @@ export function Hero({ features, variant = 'home' }: { features: Feature[]; vari
|
|||
img.decode?.().catch(() => {});
|
||||
}, [upcoming?.id]);
|
||||
|
||||
// Pause rotation when the hero is scrolled away; it picks up again on its return.
|
||||
const [visible, setVisible] = useState(true);
|
||||
useEffect(() => {
|
||||
if (!rotate || reduced || count < 2 || hover) return;
|
||||
if (!rotate || reduced || count < 2 || hover || !visible) return;
|
||||
const t = setTimeout(() => go(index + 1), ROTATE_MS);
|
||||
return () => clearTimeout(t);
|
||||
}, [index, rotate, reduced, count, hover]);
|
||||
}, [index, rotate, reduced, count, hover, visible]);
|
||||
|
||||
// Pause rotation when the hero is scrolled away.
|
||||
const [visible, setVisible] = useState(true);
|
||||
useEffect(() => {
|
||||
const el = root.current;
|
||||
if (!el) return;
|
||||
|
|
@ -60,7 +60,6 @@ export function Hero({ features, variant = 'home' }: { features: Feature[]; vari
|
|||
}, []);
|
||||
|
||||
const go = (i: number) => {
|
||||
if (!visible && i !== index) return;
|
||||
setIndex(((i % count) + count) % count);
|
||||
setCopyKey((k) => k + 1);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue