feat(anime): add version-aware extension updates

- Compare installed APK version codes before offering updates
- Add update status labels and an Update all action
This commit is contained in:
2026-09-02 19:10:03 -07:00
parent 484a9e047d
commit 18beac13f4
22 changed files with 887 additions and 81 deletions
+5
View File
@@ -175,6 +175,8 @@ export interface AvailableExtension {
name: string;
lang: string;
version: string;
/** Monotonic Android version code used to decide whether an update exists. */
versionCode: number;
nsfw: boolean;
repoUrl: string;
/** Where the repository publishes the extension's icon; may 404. */
@@ -206,6 +208,8 @@ export interface InstalledExtensionView {
langs: string[];
/** How many sources it provides; 0 when it failed to load. */
sourceCount: number;
/** Read from AndroidManifest.xml; null only for an invalid or unusual APK. */
versionCode: number | null;
/** Why it failed to load, or null when it loaded. */
error: string | null;
}
@@ -315,6 +319,7 @@ export interface AnimeBrowserAPI {
) => Promise<SourcePreferenceView[]>;
listAvailableExtensions: () => Promise<AvailableExtensionsResult>;
installExtension: (pkg: string) => Promise<void>;
updateAllExtensions: () => Promise<number>;
removeExtension: (pkg: string) => Promise<void>;
rescanExtensions: () => Promise<void>;
addRepo: (url: string) => Promise<void>;