This commit is contained in:
shafat-96
2026-04-07 22:31:34 +06:00
parent ea22c694eb
commit 37c45e59ae
3 changed files with 10 additions and 4 deletions

View File

@@ -225,7 +225,10 @@ app.get('/api/anime/hls/:movieId', async (req, res) => {
return res.status(404).json({ error: 'Embed link not found' });
}
const embedUrl = embedResponse.data.result.link;
let embedUrl = embedResponse.data.result.link;
// Convert .blog to .tv domain
embedUrl = embedUrl.replace(/\.blog/g, '.tv');
// Get HLS link from embed URL
const hlsData = await getHlsLink(embedUrl);
@@ -277,7 +280,10 @@ app.get('/api/anime/:anilistId/:episodeNum', async (req, res) => {
return res.status(404).json({ error: 'Embed link not found' });
}
const embedUrl = embedResponse.data.result.link;
let embedUrl = embedResponse.data.result.link;
// Convert .blog to .tv domain
embedUrl = embedUrl.replace(/\.blog/g, '.tv');
// Get HLS link from embed URL
const hlsData = await getHlsLink(embedUrl);