better error handling for slower addons

This commit is contained in:
chrisk325 2026-03-18 19:05:20 +05:30 committed by GitHub
parent 5458dfbdd8
commit c7198f919d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -246,7 +246,11 @@ export async function getMetaDetails(
preferredAddonId?: string
): Promise<MetaDetails | null> {
try {
if (!(await ctx.isValidContentId(type, id))) {
// isValidContentId gate removed — addonCanServeId() handles per-addon ID prefix
// filtering correctly. The gate caused false negatives when type was non-standard
// or prefixes weren't indexed yet, silently returning null before any addon was tried.
const lowerId = (id || '').toLowerCase();
if (!id || lowerId === 'null' || lowerId === 'undefined' || lowerId === 'moviebox' || lowerId === 'torbox') {
return null;
}