fixed subtitle not fetching on cahced strream link
This commit is contained in:
parent
c852c56231
commit
2a4c076854
3 changed files with 7 additions and 3 deletions
|
|
@ -729,7 +729,7 @@ const ContinueWatchingSection = React.forwardRef<ContinueWatchingRef>((props, re
|
||||||
id: item.id,
|
id: item.id,
|
||||||
type: item.type,
|
type: item.type,
|
||||||
episodeId: episodeId,
|
episodeId: episodeId,
|
||||||
imdbId: cachedStream.metadata?.imdbId || item.imdb_id,
|
imdbId: cachedStream.imdbId || cachedStream.metadata?.imdbId || item.imdb_id,
|
||||||
backdrop: cachedStream.metadata?.backdrop || item.banner,
|
backdrop: cachedStream.metadata?.backdrop || item.banner,
|
||||||
videoType: undefined, // Let player auto-detect
|
videoType: undefined, // Let player auto-detect
|
||||||
} as any);
|
} as any);
|
||||||
|
|
|
||||||
|
|
@ -1150,7 +1150,8 @@ export const StreamsScreen = () => {
|
||||||
episodeId,
|
episodeId,
|
||||||
season,
|
season,
|
||||||
episode,
|
episode,
|
||||||
episodeTitle
|
episodeTitle,
|
||||||
|
imdbId || undefined
|
||||||
);
|
);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
logger.warn('[StreamsScreen] Failed to save stream to cache:', error);
|
logger.warn('[StreamsScreen] Failed to save stream to cache:', error);
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ export interface CachedStream {
|
||||||
season?: number;
|
season?: number;
|
||||||
episode?: number;
|
episode?: number;
|
||||||
episodeTitle?: string;
|
episodeTitle?: string;
|
||||||
|
imdbId?: string; // IMDb ID for subtitle fetching
|
||||||
timestamp: number; // When it was cached
|
timestamp: number; // When it was cached
|
||||||
url: string; // Stream URL for quick validation
|
url: string; // Stream URL for quick validation
|
||||||
}
|
}
|
||||||
|
|
@ -32,7 +33,8 @@ class StreamCacheService {
|
||||||
episodeId?: string,
|
episodeId?: string,
|
||||||
season?: number,
|
season?: number,
|
||||||
episode?: number,
|
episode?: number,
|
||||||
episodeTitle?: string
|
episodeTitle?: string,
|
||||||
|
imdbId?: string
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
try {
|
try {
|
||||||
const cacheKey = this.getCacheKey(id, type, episodeId);
|
const cacheKey = this.getCacheKey(id, type, episodeId);
|
||||||
|
|
@ -45,6 +47,7 @@ class StreamCacheService {
|
||||||
season,
|
season,
|
||||||
episode,
|
episode,
|
||||||
episodeTitle,
|
episodeTitle,
|
||||||
|
imdbId,
|
||||||
timestamp: now,
|
timestamp: now,
|
||||||
url: stream.url
|
url: stream.url
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue