extension(soaper): fix null subtitles

This commit is contained in:
Swakshan
2025-03-22 17:52:27 +05:30
parent 9a46bf059d
commit 4823d30252

View File

@@ -5,7 +5,7 @@ const mangayomiSources = [{
"apiUrl": "", "apiUrl": "",
"iconUrl": "https://www.google.com/s2/favicons?sz=128&domain=https://soaper.cc/", "iconUrl": "https://www.google.com/s2/favicons?sz=128&domain=https://soaper.cc/",
"typeSource": "multi", "typeSource": "multi",
"version": "1.0.3", "version": "1.0.4",
"itemType": 1, "itemType": 1,
"dateFormat": "", "dateFormat": "",
"dateFormatLocale": "", "dateFormatLocale": "",
@@ -193,11 +193,14 @@ class DefaultExtension extends MProvider {
var streamUrl = baseUrl + res.val var streamUrl = baseUrl + res.val
var subs = [] var subs = []
for (var sub of res.subs) { var vidSubs = res.subs
subs.push({ if (vidSubs != null && vidSubs.length > 0) {
file: baseUrl + sub.path, for (var sub of vidSubs) {
label: sub.name subs.push({
}) file: baseUrl + sub.path,
label: sub.name
})
}
} }
streams.push({ streams.push({
url: streamUrl, url: streamUrl,