Skip to content

Commit

Permalink
Thank you, gogoanime
Browse files Browse the repository at this point in the history
  • Loading branch information
nadecancode committed Feb 3, 2023
1 parent e3cf541 commit 15e2b8f
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions components/player/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,19 @@ export default function EnimePlayer(props) {
fetch(enimeApi + `/source/${sources[sourceIndex].id}`)
.then((res) => res.json())
.then((res) => {
setSource({
...res,
url: `https://cdn.nade.me/redirect?url=${res.url}`,
});
fetch(`https://cdn.nade.me/generate?url=${encodeURIComponent(res.url)}`, {
headers: {
"x-origin": "none",
"x-referer": "none"
}
})
.then(r => r.text())
.then(r => {
setSource({
...res,
url: r,
});
})
});
}, [sourceIndex]);

Expand Down

0 comments on commit 15e2b8f

Please sign in to comment.