mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-08-16 13:55:51 -07:00
fix(anime): scope preferences, paginate sources, harden installs
- Preference store keys entries by extension package + bridge source id; legacy unscoped entries are discarded once instead of being handed to whichever extension asks first - Source picker's "Load more" appends the next page without duplicating streamed results - Repository index fetches and subtitle/APK downloads now time out and are size-bounded instead of hanging or growing unbounded - APK installs are staged to a temp file and renamed into place - Stream metadata lookup matches the requested path, not only the currently playing one - Reworked animeui into browse-state/detail-panel/panels.css modules - Reverted premature CHANGELOG unreleased entries; refreshed anime-browser docs
This commit is contained in:
+9
-4
@@ -489,6 +489,7 @@ import {
|
||||
import { createMediaRuntimeService } from './main/media-runtime';
|
||||
import {
|
||||
createStreamPlaybackMetadataStore,
|
||||
matchRequestedStreamPlaybackMetadata,
|
||||
toAnilistMediaGuess,
|
||||
toJimakuMediaInfo,
|
||||
} from './main/runtime/stream-playback-metadata';
|
||||
@@ -2420,9 +2421,13 @@ const JELLYFIN_SUBTITLE_DELAYS_PATH = path.join(CONFIG_DIR, 'jellyfin-subtitle-d
|
||||
*/
|
||||
const streamPlaybackMetadata = createStreamPlaybackMetadataStore();
|
||||
|
||||
/** The stream metadata for whatever mpv currently has open, if it is a stream. */
|
||||
function getActiveStreamMetadata() {
|
||||
return streamPlaybackMetadata.match(appState.currentMediaPath);
|
||||
/** Stream metadata for the requested path, or current media when none was supplied. */
|
||||
function getActiveStreamMetadata(mediaPath: string | null = null) {
|
||||
return matchRequestedStreamPlaybackMetadata(
|
||||
streamPlaybackMetadata,
|
||||
mediaPath,
|
||||
appState.currentMediaPath,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2433,7 +2438,7 @@ async function guessAnilistMediaInfoForCurrentMedia(
|
||||
mediaPath: string | null,
|
||||
mediaTitle: string | null,
|
||||
): Promise<AnilistMediaGuess | null> {
|
||||
const stream = getActiveStreamMetadata();
|
||||
const stream = getActiveStreamMetadata(mediaPath);
|
||||
const streamGuess = stream ? toAnilistMediaGuess(stream) : null;
|
||||
return streamGuess ?? guessAnilistMediaInfo(mediaPath, mediaTitle);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user