mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-09-20 05:16:18 -07:00
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:
@@ -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.`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user