feat(anime): support shared bridge installs and updates

- Prefer configured or package-managed bridge bundles before downloading
- Select compatible upstream releases and offer managed-bundle updates
- Document bridge configuration and package dependencies
This commit is contained in:
2026-09-01 23:14:16 -07:00
parent 1d1575f414
commit 2bcb6c7e98
33 changed files with 1136 additions and 229 deletions
+14
View File
@@ -1,4 +1,5 @@
import type {
AnimeBrowserBridgeInstall,
AnimeBrowserSearchResult,
AnimeBrowserSource,
InstalledExtensionView,
@@ -33,3 +34,16 @@ export function describeInstalled(view: InstalledExtensionView): string {
if (view.langs.length > 0) parts.push(view.langs.join(', '));
return parts.join(' · ');
}
/** One line for the Extensions tab: which bridge is running and who updates it. */
export function describeBridgeInstall(install: AnimeBrowserBridgeInstall | null): string {
if (install === null) return 'The extension bridge has not started yet.';
const version = install.version ?? 'unknown version';
if (install.origin === 'system') {
return `M-Extension-Server ${version} from ${install.dir}, installed outside SubMiner (for example by your package manager), which is where updates come from.`;
}
if (install.updateAvailable !== null) {
return `M-Extension-Server ${version} in ${install.dir}, downloaded by SubMiner. ${install.updateAvailable} is available from the banner above.`;
}
return `M-Extension-Server ${version} in ${install.dir}, downloaded by SubMiner and up to date.`;
}