Skip to content
This repository has been archived by the owner on Jul 14, 2024. It is now read-only.

Commit

Permalink
Update v4.0.2 (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
DevanAbinaya committed Sep 14, 2023
1 parent 195ffb7 commit ab9b67f
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 12 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)'
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "moopa",
"version": "4.0.1",
"version": "4.0.2",
"private": true,
"founder": "Factiven",
"scripts": {
Expand Down
21 changes: 16 additions & 5 deletions pages/api/v2/episode/[id].js
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,40 @@ 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 [];
}

const array = [
{
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 [];
}
}
Expand Down Expand Up @@ -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 [];
}
}
Expand Down
1 change: 0 additions & 1 deletion public/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
8 changes: 4 additions & 4 deletions release.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit ab9b67f

Please sign in to comment.