fix: a refresh no longer drags you off a channel; cap Download all

The auto-refresh could throw you back to All subscriptions and then
refuse to let you back in. useFeed rebuilt reload() whenever the filter
changed, so a refresh started before you picked a channel still held
the old closure: half a minute later it re-fetched the unfiltered list
and overwrote yours. The sidebar still showed the channel as selected,
so clicking it changed nothing and there was no way back except via
another channel.

reload() now reads the filter at call time instead of capturing it, and
carries a sequence number so a slow reply cannot overwrite a newer one.
It is stable across filter changes, which also stops the auto-refresh
interval being torn down and restarted every time you click a channel.

Download all now works from All subscriptions too, capped by a new
Settings limit (default 25, up to no limit). It takes the newest first
and says what it did — "Queued the newest 25 of 500" — so a cap is
never silent. Press it again for the next batch.
This commit is contained in:
vincent
2026-08-29 16:13:44 +02:00
parent caea8bad8f
commit 66cb80a044
5 changed files with 100 additions and 22 deletions
+14
View File
@@ -113,6 +113,20 @@ export const STREAM_QUALITIES: Array<{ value: Quality; label: string }> = [
{ value: "480", label: "480p" },
];
/**
* How many videos one "Download all" may queue. All subscriptions can be
* hundreds of videos, which is not something to set going by accident.
*/
export const BULK_LIMITS: Array<{ value: number; label: string }> = [
{ value: 5, label: "5 videos" },
{ value: 10, label: "10 videos" },
{ value: 25, label: "25 videos" },
{ value: 50, label: "50 videos" },
{ value: 100, label: "100 videos" },
{ value: 0, label: "No limit" },
];
export const DEFAULT_BULK_LIMIT = 25;
/** Preferred subtitle language: shown when available, and downloaded. */
export const SUB_LANGS: Array<{ value: string; label: string }> = [
{ value: "off", label: "None" },