aboutsummaryrefslogtreecommitdiff
path: root/src/app/kdrama/components/requests.js
diff options
context:
space:
mode:
authorreal-zephex <[email protected]>2024-05-26 22:29:35 +0530
committerreal-zephex <[email protected]>2024-05-26 22:29:35 +0530
commit3da8e6263d1900571cc8565b19d1b383dfbbf631 (patch)
treec9aefb831b91e9f8c531d246be2cd88cd0af669a /src/app/kdrama/components/requests.js
parent🚀 feat(download): add download feature for movies (diff)
downloaddramalama-3da8e6263d1900571cc8565b19d1b383dfbbf631.tar.xz
dramalama-3da8e6263d1900571cc8565b19d1b383dfbbf631.zip
⚡️ perf(kdrama, anime): cache video links, replace next/image
Diffstat (limited to 'src/app/kdrama/components/requests.js')
-rw-r--r--src/app/kdrama/components/requests.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/app/kdrama/components/requests.js b/src/app/kdrama/components/requests.js
index 5609d79..1c82b79 100644
--- a/src/app/kdrama/components/requests.js
+++ b/src/app/kdrama/components/requests.js
@@ -36,9 +36,9 @@ export const dramaInfo = async (id) => {
export const videoLink = async (epiId, mediaId) => {
const res = await fetch(videoURL(epiId, mediaId), {
- next: { revalidate: 21600 },
+ cache: "force-cache",
});
const data = await res.json();
- const videoLink = data.sources[0].url;
- return videoLink;
+ const vidLink = await data.sources[0].url;
+ return vidLink;
};