mirror of
https://github.com/tapframe/NuvioStreaming.git
synced 2026-05-17 15:32:01 +00:00
fix for anime ids tvdb+kitsu
This commit is contained in:
parent
dd6b0ffb46
commit
72b953b39e
1 changed files with 9 additions and 4 deletions
|
|
@ -2029,12 +2029,17 @@ export const useMetadata = ({ id, type, addonId }: UseMetadataProps): UseMetadat
|
|||
// Remove 'series:' prefix if present to be safe, though parsing logic above usually handles it
|
||||
stremioEpisodeId = episodeId.replace(/^series:/, '');
|
||||
} else if (!seasonNum) {
|
||||
// No season (e.g., mal:57658:1) - use id:episode format
|
||||
stremioEpisodeId = `${id}:${episodeNum}`;
|
||||
// No season (e.g., kitsu:12345:1, mal:57658:1) - use showIdStr:episode format.
|
||||
// Use showIdStr (parsed from episodeId) rather than outer `id` so that when the
|
||||
// show has multiple IDs (e.g. tvdb+kitsu), we preserve the namespace that the
|
||||
// episode actually belongs to (e.g. kitsu:animeId:epNum, not tvdb:showId:epNum).
|
||||
const baseId = showIdStr && showIdStr !== id ? showIdStr : id;
|
||||
stremioEpisodeId = `${baseId}:${episodeNum}`;
|
||||
} else {
|
||||
stremioEpisodeId = `${id}:${seasonNum}:${episodeNum}`;
|
||||
const baseId = showIdStr && showIdStr !== id ? showIdStr : id;
|
||||
stremioEpisodeId = `${baseId}:${seasonNum}:${episodeNum}`;
|
||||
}
|
||||
if (__DEV__) console.log('ℹ️ [loadEpisodeStreams] Using ID as both TMDB and Stremio ID:', tmdbId);
|
||||
if (__DEV__) console.log('ℹ️ [loadEpisodeStreams] Using ID as both TMDB and Stremio ID:', tmdbId, '| stremioEpisodeId:', stremioEpisodeId);
|
||||
}
|
||||
|
||||
// Extract episode info from the episodeId for logging
|
||||
|
|
|
|||
Loading…
Reference in a new issue