From 4823d30252a68e319993354a6841a096258641b4 Mon Sep 17 00:00:00 2001 From: Swakshan Date: Sat, 22 Mar 2025 17:52:27 +0530 Subject: [PATCH] extension(soaper): fix null subtitles --- javascript/anime/src/all/soaper.js | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/javascript/anime/src/all/soaper.js b/javascript/anime/src/all/soaper.js index 6dd9a6b1..49e2f917 100644 --- a/javascript/anime/src/all/soaper.js +++ b/javascript/anime/src/all/soaper.js @@ -5,7 +5,7 @@ const mangayomiSources = [{ "apiUrl": "", "iconUrl": "https://www.google.com/s2/favicons?sz=128&domain=https://soaper.cc/", "typeSource": "multi", - "version": "1.0.3", + "version": "1.0.4", "itemType": 1, "dateFormat": "", "dateFormatLocale": "", @@ -193,11 +193,14 @@ class DefaultExtension extends MProvider { var streamUrl = baseUrl + res.val var subs = [] - for (var sub of res.subs) { - subs.push({ - file: baseUrl + sub.path, - label: sub.name - }) + var vidSubs = res.subs + if (vidSubs != null && vidSubs.length > 0) { + for (var sub of vidSubs) { + subs.push({ + file: baseUrl + sub.path, + label: sub.name + }) + } } streams.push({ url: streamUrl,