aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFactiven <[email protected]>2023-09-14 13:02:03 +0700
committerGitHub <[email protected]>2023-09-14 13:02:03 +0700
commitab9b67f81dfaee07638ea468897dcd787aff9c2f (patch)
tree7fc04f5f1896ff28f3008649d25f2e2d14e031e1
parentUpdate v4.0.1 - Merge pre-push to main (#73) (diff)
downloadmoopa-ab9b67f81dfaee07638ea468897dcd787aff9c2f.tar.xz
moopa-ab9b67f81dfaee07638ea468897dcd787aff9c2f.zip
Update v4.0.2 (#75)v4.0.2
-rw-r--r--README.md2
-rw-r--r--package.json2
-rw-r--r--pages/api/v2/episode/[id].js21
-rw-r--r--public/manifest.json1
-rw-r--r--release.md8
5 files changed, 22 insertions, 12 deletions
diff --git a/README.md b/README.md
index c58dbb1..24c6a6d 100644
--- a/README.md
+++ b/README.md
@@ -114,7 +114,7 @@ NEXTAUTH_SECRET='run this cmd in your bash terminal (openssl rand -base64 32) wi
NEXTAUTH_URL="for development use http://localhost:3000/ and for production use your domain url"
## NextJS
-PROXY_URI="I recommend you to use this cors-anywhere as a proxy https://github.com/Rob--W/cors-anywhere follow the instruction on how to use it there. Skip this if you only use gogoanime as a source"
+PROXY_URI="use this cors proxy https://github.com/Gratenes/m3u8CloudflareWorkerProxy, follow the instruction there on how to deploy it."
API_URI="host your own API from this repo https://github.com/consumet/api.consumet.org. Don't put / at the end of the url."
API_KEY="this API key is used for schedules and manga page. get the key from https://anify.tv/discord"
DISQUS_SHORTNAME='put your disqus shortname here. (optional)'
diff --git a/package.json b/package.json
index 2a6f84c..529af9f 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "moopa",
- "version": "4.0.1",
+ "version": "4.0.2",
"private": true,
"founder": "Factiven",
"scripts": {
diff --git a/pages/api/v2/episode/[id].js b/pages/api/v2/episode/[id].js
index 1d328f6..e17f76a 100644
--- a/pages/api/v2/episode/[id].js
+++ b/pages/api/v2/episode/[id].js
@@ -4,15 +4,26 @@ import redis from "../../../../lib/redis";
const CONSUMET_URI = process.env.API_URI;
const API_KEY = process.env.API_KEY;
+const isAscending = (data) => {
+ for (let i = 1; i < data.length; i++) {
+ if (data[i].number < data[i - 1].number) {
+ return false;
+ }
+ }
+ return true;
+};
+
async function fetchConsumet(id, dub) {
try {
if (dub) {
return [];
}
- const { data } = await axios.get(`${CONSUMET_URI}/meta/anilist/info/${id}`);
+ const { data } = await axios.get(
+ `${CONSUMET_URI}/meta/anilist/episodes/${id}`
+ );
- if (!data?.episodes?.length > 0) {
+ if (data?.message === "Anime not found") {
return [];
}
@@ -20,13 +31,13 @@ async function fetchConsumet(id, dub) {
{
map: true,
providerId: "gogoanime",
- episodes: data.episodes.reverse(),
+ episodes: isAscending(data) ? data : data.reverse(),
},
];
return array;
} catch (error) {
- console.error(error);
+ console.error("Error fetching and processing data:", error.message);
return [];
}
}
@@ -58,7 +69,7 @@ async function fetchAnify(id) {
return modifiedData;
} catch (error) {
- console.error(error);
+ console.error("Error fetching and processing data:", error.message);
return [];
}
}
diff --git a/public/manifest.json b/public/manifest.json
index 7a278ec..6505617 100644
--- a/public/manifest.json
+++ b/public/manifest.json
@@ -7,7 +7,6 @@
"name": "Moopa",
"short_name": "moopa",
"description": "Watch and Read your favorite Anime/Manga in one single app",
- "orientation": "portrait-primary",
"icons": [
{
"src": "/icon-192x192.png",
diff --git a/release.md b/release.md
index 21f9b49..b8527f9 100644
--- a/release.md
+++ b/release.md
@@ -2,13 +2,13 @@
This document contains a summary of all significant changes made to this release.
-## Update v4.0.1
+## 🎉 Update v4.0.2
### Fixed
-- No episodes showing on recently watched
-- Logout button on profile send user to profile page
+- Issue #74 : Resolved mobile rotation locked on portrait mode
+- No more descending episode lists causing continue button to play episodes backward
### Changed
-- Changed profile picture from square to circle
+- Update `README.md` file for cors inside env