fix multiple providers

This commit is contained in:
Himanshu
2026-05-11 21:50:15 +05:30
parent 2ce3c737d1
commit 8c161715f7
21 changed files with 82 additions and 38 deletions
+11 -1
View File
@@ -74,8 +74,18 @@ export const getEpisodes = async function ({
}
});
}
if (episodeLinks.length === 0) {
// https://hubcloud.foo/drive/gvdzmpioeeaf8mp
// find link contain hubcloud and have drive in url using regex
const hubcloudLink = html.match(
/https:\/\/hubcloud\.[^\/]+\/drive\/[^"'\s]+/i,
)?.[0];
if (hubcloudLink) {
episodeLinks.push({ title: "Play", link: hubcloudLink });
}
}
// console.log(episodeLinks);
console.log("episodeLinks:", episodeLinks);
return episodeLinks.length > 0
? episodeLinks
: [{ title: "Play", link: url }];