mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-08-16 01:55:51 -07:00
ec48f90cd4
- Add `subminer anime` / `--anime` and a tray entry to open a browser that searches installed Aniyomi extension sources, shows cover art and episodes, and plays into mpv with overlay/mining attached - Add an Extensions tab to add repos and install/update/remove sources, and per-source settings for sources needing config - Support searching all sources at once with streaming, per-source results and status - Prefer Japanese audio/subtitle tracks from the source and keep the primary subtitle slot reserved for Japanese - Fix window/tray/Dock handling so the browser and mpv can be switched between without quitting the app or losing the Dock icon - Add anime.repos, anime.extensionsDir, anime.preferredQuality config keys (no bundled repos or discovery)
14 lines
533 B
TypeScript
14 lines
533 B
TypeScript
/** Small helpers shared by the anime browser's panels. */
|
|
|
|
export function el<T extends HTMLElement>(id: string): T {
|
|
const node = document.getElementById(id);
|
|
if (!node) throw new Error(`Missing element #${id}`);
|
|
return node as T;
|
|
}
|
|
|
|
export function describe(error: unknown): string {
|
|
const message = error instanceof Error ? error.message : String(error);
|
|
// Electron wraps handler errors; keep only the useful tail.
|
|
return message.replace(/^Error invoking remote method '[^']+':\s*/, '').replace(/^Error:\s*/, '');
|
|
}
|