mirror of
https://github.com/tapframe/NuvioStreaming.git
synced 2026-03-19 09:17:38 +00:00
fix for edge case anime ids imdb+kitsu
This commit is contained in:
parent
d0bfd3550a
commit
3900b57a16
1 changed files with 8 additions and 6 deletions
|
|
@ -2016,16 +2016,18 @@ export const useMetadata = ({ id, type, addonId }: UseMetadataProps): UseMetadat
|
|||
}
|
||||
if (__DEV__) console.log('✅ [loadEpisodeStreams] Converted to TMDB ID:', tmdbId);
|
||||
|
||||
// Ensure consistent format
|
||||
// Ensure consistent format or fallback to episodeId if parsing failed
|
||||
// This handles cases where 'tt' is used for a unique episode ID directly
|
||||
// Ensure consistent format or fallback to episodeId if parsing failed.
|
||||
// If the episode's namespace differs from the show's tt id (e.g. kitsu:48363:8
|
||||
// on a tt-identified show), use showIdStr so we request via the correct namespace.
|
||||
if (!seasonNum && !episodeNum) {
|
||||
stremioEpisodeId = episodeId;
|
||||
} else if (!seasonNum) {
|
||||
// No season (e.g., mal:57658:1) - use id:episode format
|
||||
stremioEpisodeId = `${id}:${episodeNum}`;
|
||||
// No season (e.g., kitsu:48363:8, mal:57658:1)
|
||||
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] Normalized episode ID for addons:', stremioEpisodeId);
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in a new issue