+
=6"
- }
- },
"node_modules/cluster-key-slot": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/cluster-key-slot/-/cluster-key-slot-1.1.2.tgz",
@@ -6988,23 +6978,6 @@
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.13.tgz",
"integrity": "sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ=="
},
- "node_modules/nookies": {
- "version": "2.5.2",
- "resolved": "https://registry.npmjs.org/nookies/-/nookies-2.5.2.tgz",
- "integrity": "sha512-x0TRSaosAEonNKyCrShoUaJ5rrT5KHRNZ5DwPCuizjgrnkpE5DRf3VL7AyyQin4htict92X1EQ7ejDbaHDVdYA==",
- "dependencies": {
- "cookie": "^0.4.1",
- "set-cookie-parser": "^2.4.6"
- }
- },
- "node_modules/nookies/node_modules/cookie": {
- "version": "0.4.2",
- "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz",
- "integrity": "sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==",
- "engines": {
- "node": ">= 0.6"
- }
- },
"node_modules/normalize-path": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
@@ -7861,18 +7834,6 @@
"react": ">=16.8.0"
}
},
- "node_modules/react-toastify": {
- "version": "9.1.3",
- "resolved": "https://registry.npmjs.org/react-toastify/-/react-toastify-9.1.3.tgz",
- "integrity": "sha512-fPfb8ghtn/XMxw3LkxQBk3IyagNpF/LIKjOBflbexr2AWxAH1MJgvnESwEwBn9liLFXgTKWgBSdZpw9m4OTHTg==",
- "dependencies": {
- "clsx": "^1.1.1"
- },
- "peerDependencies": {
- "react": ">=16",
- "react-dom": ">=16"
- }
- },
"node_modules/react-use-draggable-scroll": {
"version": "0.4.7",
"resolved": "https://registry.npmjs.org/react-use-draggable-scroll/-/react-use-draggable-scroll-0.4.7.tgz",
@@ -8399,11 +8360,6 @@
"randombytes": "^2.1.0"
}
},
- "node_modules/set-cookie-parser": {
- "version": "2.6.0",
- "resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-2.6.0.tgz",
- "integrity": "sha512-RVnVQxTXuerk653XfuliOxBP81Sf0+qfQE73LIYKcyMYHG94AuH0kgrQpRDuTZnSmjpysHmzxJXKNfa6PjFhyQ=="
- },
"node_modules/set-function-name": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.1.tgz",
diff --git a/package.json b/package.json
index a13c9fe4..9d63838c 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "moopa",
- "version": "4.2.0",
+ "version": "4.2.1",
"private": true,
"founder": "Factiven",
"scripts": {
@@ -30,13 +30,11 @@
"next-auth": "^4.22.0",
"next-pwa": "^5.6.0",
"nextjs-progressbar": "^0.0.16",
- "nookies": "^2.5.2",
"rate-limiter-flexible": "^3.0.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-icons": "^4.7.1",
"react-loading-skeleton": "^3.2.0",
- "react-toastify": "^9.1.3",
"react-use-draggable-scroll": "^0.4.7",
"sharp": "^0.32.6",
"sonner": "^1.0.3",
diff --git a/pages/api/v2/episode/[id].js b/pages/api/v2/episode/[id].js
index b86a1983..029d131a 100644
--- a/pages/api/v2/episode/[id].js
+++ b/pages/api/v2/episode/[id].js
@@ -1,6 +1,5 @@
import axios from "axios";
import { rateLimitStrict, rateLimiterRedis, redis } from "@/lib/redis";
-import appendImagesToEpisodes from "@/utils/combineImages";
import appendMetaToEpisodes from "@/utils/appendMetaToEpisodes";
let CONSUMET_URI;
@@ -158,8 +157,13 @@ async function fetchCoverImage(id, available = false) {
export default async function handler(req, res) {
const { id, releasing = "false", dub = false, refresh = null } = req.query;
- // if releasing is true then cache for 10 minutes, if it false cache for 1 month;
- const cacheTime = releasing === "true" ? 60 * 10 : 60 * 60 * 24 * 30;
+ // if releasing is true then cache for 1 hour, if it false cache for 1 month;
+ let cacheTime = null;
+ if (releasing === "true") {
+ cacheTime = 60 * 60; // 1 hour
+ } else if (releasing === "false") {
+ cacheTime = 60 * 60 * 24 * 30; // 1 month
+ }
let cached;
let meta;
diff --git a/pages/en/anime/watch/[...info].js b/pages/en/anime/watch/[...info].js
index a838b7f8..24276698 100644
--- a/pages/en/anime/watch/[...info].js
+++ b/pages/en/anime/watch/[...info].js
@@ -354,9 +354,13 @@ export default function Watch({
{episodeNavigation?.playing?.title ||
`${info?.title?.romaji} - Episode ${epiNumber}`}
- {/* Write the best SEO for this watch page with data of anime title from info.title.romaji, episode title from episodeNavigation?.playing?.title, description from episodeNavigation?.playing?.description, episode number from epiNumber */}
+
- {/* Write the best SEO for this homepage */}
-
+
{episodeNavigation?.playing?.number ? (
`Episode ${episodeNavigation?.playing?.number}`
) : (
)}
-
+