mirror of
https://github.com/shafat-96/anicrush-api.git
synced 2026-04-17 15:51:44 +00:00
fix
This commit is contained in:
10
index.js
10
index.js
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user