aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFactiven <[email protected]>2023-05-09 19:27:06 +0700
committerFactiven <[email protected]>2023-05-09 19:27:06 +0700
commit565d68433b0bd19097048dc418073f3acffd95a9 (patch)
treecaeacf5a945fa3c1a69613da036cd44d4839c9ca
parentRevamped 404 page (diff)
downloadmoopa-565d68433b0bd19097048dc418073f3acffd95a9.tar.xz
moopa-565d68433b0bd19097048dc418073f3acffd95a9.zip
Update v3.5.5
-rw-r--r--README.md4
-rw-r--r--components/videoPlayer.js81
-rw-r--r--lib/Artplayer.js5
-rw-r--r--package.json2
-rw-r--r--pages/anime/watch/[...info].js7
-rw-r--r--pages/dmca.js10
-rw-r--r--pages/manga/chapter/[chapter].js10
-rw-r--r--styles/globals.css2
8 files changed, 54 insertions, 67 deletions
diff --git a/README.md b/README.md
index f7ea700..cb9c373 100644
--- a/README.md
+++ b/README.md
@@ -116,9 +116,9 @@ This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md
## Contact
Thank You for passing by!!
-If you have any questions or feedback, please reach out to us at [[email protected]](mailto:[email protected]), or you can join our [discord sever](https://discord.gg/4xTGhr85BG).
+If you have any questions or feedback, please reach out to us at [[email protected]](mailto:[email protected]?subject=[Moopa]%20-%20Your%20Subject), or you can join our [discord sever](https://discord.gg/4xTGhr85BG).
<br>
-or you can DM me on Discord ```CritenDust#3704```/```Factiven#9110```. (just contact me on one of these account)
+or you can DM me on Discord `Factiven#9110`/`CritenDust#3704`. (just contact me on one of these account)
## Support This Project
diff --git a/components/videoPlayer.js b/components/videoPlayer.js
index 2a2ffb8..c879df6 100644
--- a/components/videoPlayer.js
+++ b/components/videoPlayer.js
@@ -35,25 +35,13 @@ export default function VideoPlayer({
source.quality === "144p"
);
- const source = data.sources
- .map((items) => ({
- html: items.quality,
- url: `https://cors.moopa.my.id/${items.url}`,
- }))
- // url: `https://m3u8proxy.moopa.workers.dev/?url=${encodeURIComponent(
- // items.url
- // )}&referer=${encodeURIComponent(referer)}`,
- // }))
- .sort((a, b) => {
- if (a.html === "default") return -1;
- if (b.html === "default") return 1;
- return 0;
- });
+ const source = data.sources.map((items) => ({
+ default: items.quality === "default" ? true : false,
+ html: items.quality === "default" ? "auto" : items.quality,
+ url: `https://cors.moopa.my.id/${items.url}`,
+ }));
const defUrl = `https://cors.moopa.my.id/${sumber.url}`;
- // const defUrl = `https://m3u8proxy.moopa.workers.dev/?url=${encodeURIComponent(
- // sumber.url
- // )}&referer=${encodeURIComponent(referer)}`;
setUrl(defUrl);
setSource(source);
@@ -131,60 +119,51 @@ export default function VideoPlayer({
currentTime <= op.interval.endTime
) {
// Add the layer if it's not already added
- if (!art.layers.op) {
- art.layers.add({
+ if (!art.controls["op"]) {
+ // Remove the other control if it's already added
+ if (art.controls["ed"]) {
+ art.controls.remove("ed");
+ }
+
+ // Add the control
+ art.controls.add({
name: "op",
- html: `<button class="skip-button">Skip Opening</button>`,
- tooltip: "Skip",
- style: {
- position: "absolute",
- bottom: "68px",
- right: "58px",
- },
+ position: "top",
+ html: '<button class="skip-button">Skip Opening</button>',
click: function (...args) {
art.seek = op.interval.endTime;
},
});
}
- // Show the layer
- art.layers.show = true;
- art.layers.op.style.display = "block";
- if (art.layers.ed) {
- art.layers.ed.style.display = "none";
- }
} else if (
ed &&
currentTime >= ed.interval.startTime &&
currentTime <= ed.interval.endTime
) {
// Add the layer if it's not already added
- if (!art.layers.ed) {
- art.layers.add({
+ if (!art.controls["ed"]) {
+ // Remove the other control if it's already added
+ if (art.controls["op"]) {
+ art.controls.remove("op");
+ }
+
+ // Add the control
+ art.controls.add({
name: "ed",
- html: `<button class="skip-button">Skip Ending</button>`,
- tooltip: "Skip",
- style: {
- position: "absolute",
- bottom: "68px",
- right: "58px",
- },
+ position: "top",
+ html: '<button class="skip-button">Skip Ending</button>',
click: function (...args) {
art.seek = ed.interval.endTime;
},
});
}
- // Show the layer
- art.layers.show = true;
- art.layers.ed.style.display = "block";
- if (art.layers.op) {
- art.layers.op.style.display = "none";
- }
} else {
- if (art.layers.op) {
- art.layers.op.style.display = "none";
+ // Remove the controls if they're added
+ if (art.controls["op"]) {
+ art.controls.remove("op");
}
- if (art.layers.ed) {
- art.layers.ed.style.display = "none";
+ if (art.controls["ed"]) {
+ art.controls.remove("ed");
}
}
});
diff --git a/lib/Artplayer.js b/lib/Artplayer.js
index 33acf21..74f9acd 100644
--- a/lib/Artplayer.js
+++ b/lib/Artplayer.js
@@ -30,7 +30,12 @@ export default function Player({ option, getInstance, ...rest }) {
fullscreen: true,
hotkey: true,
lock: true,
+ setting: true,
+ flip: true,
+ playbackRate: true,
+ aspectRatio: true,
autoOrientation: true,
+ pip: true,
theme: "#f97316",
});
diff --git a/package.json b/package.json
index d20a84e..4c718b2 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "moopa",
- "version": "3.5.4",
+ "version": "3.5.5",
"private": true,
"scripts": {
"dev": "next dev",
diff --git a/pages/anime/watch/[...info].js b/pages/anime/watch/[...info].js
index 3a779a5..13b9980 100644
--- a/pages/anime/watch/[...info].js
+++ b/pages/anime/watch/[...info].js
@@ -3,11 +3,8 @@ import Link from "next/link";
import { closestMatch } from "closest-match";
import Head from "next/head";
import { useEffect, useState } from "react";
-import Modal from "../../../components/modal";
import dynamic from "next/dynamic";
-import { useNotification } from "../../../lib/useNotify";
-
import { getServerSession } from "next-auth/next";
import { authOptions } from "../../api/auth/[...nextauth]";
@@ -262,7 +259,7 @@ export default function Info({ sessions, id, aniId, provider }) {
const artwork =
poster && poster.length > 0
- ? [{ src: poster[0].image, type: "image/jpeg" }]
+ ? [{ src: poster[0].image, sizes: "512x512", type: "image/jpeg" }]
: undefined;
mediaSession.metadata = new MediaMetadata({
@@ -460,7 +457,7 @@ export default function Info({ sessions, id, aniId, provider }) {
<h1 className="text-xl font-karla pl-4 pb-5 font-semibold">
Up Next
</h1>
- <div className="grid gap-5 lg:px-5 px-2 py-2 scrollbar-thin scrollbar-thumb-[#313131] scrollbar-thumb-rounded-full">
+ <div className="flex flex-col gap-5 lg:pl-5 px-2 py-2 scrollbar-thin scrollbar-thumb-[#313131] scrollbar-thumb-rounded-full">
{data ? (
data.episodes.length > 0 ? (
data.episodes.some(
diff --git a/pages/dmca.js b/pages/dmca.js
index eeed80c..f306054 100644
--- a/pages/dmca.js
+++ b/pages/dmca.js
@@ -91,8 +91,14 @@ export default function DMCA() {
downloading/uploading of movies. We only post links that are
available on the internet. If you believe that any content on
our website infringes upon your intellectual property rights and
- you hold the copyright for that content, please report it to
- [email protected] and the content will be immediately removed.
+ you hold the copyright for that content, please report it to{" "}
+ <a
+ href="mailto:[email protected]?subject=[Moopa]%20-%20Your%20Subject"
+ className="font-semibold"
+ >
+ </a>{" "}
+ and the content will be immediately removed.
</p>
</div>
</div>
diff --git a/pages/manga/chapter/[chapter].js b/pages/manga/chapter/[chapter].js
index eea14c0..14f04ca 100644
--- a/pages/manga/chapter/[chapter].js
+++ b/pages/manga/chapter/[chapter].js
@@ -98,7 +98,7 @@ export default function Test({ title, id, aniId, data, provider }) {
setData(datas);
} else {
const dat = data.map((item) => ({
- img: `https://cors.moopa.my.id/?url=${encodeURIComponent(
+ img: `https://api.consumet.org/utils/image-proxy?url=${encodeURIComponent(
item.img
)}&referer=${encodeURIComponent(item.headerForImage.Referer)}`,
page: item.page,
@@ -151,7 +151,7 @@ export default function Test({ title, id, aniId, data, provider }) {
setData(datas);
} else {
const dat = data.map((item) => ({
- img: `https://cors.moopa.my.id/?url=${encodeURIComponent(
+ img: `https://api.consumet.org/utils/image-proxy?url=${encodeURIComponent(
item.img
)}&referer=${encodeURIComponent(item.headerForImage.Referer)}`,
page: item.page,
@@ -234,7 +234,7 @@ export default function Test({ title, id, aniId, data, provider }) {
setData(datas);
} else {
const dat = data.map((item) => ({
- img: `https://cors.moopa.my.id/?url=${encodeURIComponent(
+ img: `https://api.consumet.org/utils/image-proxy?url=${encodeURIComponent(
item.img
)}&referer=${encodeURIComponent(item.headerForImage.Referer)}`,
page: item.page,
@@ -283,7 +283,7 @@ export default function Test({ title, id, aniId, data, provider }) {
setData(datas);
} else {
const dat = data.map((item) => ({
- img: `https://cors.moopa.my.id/?url=${encodeURIComponent(
+ img: `https://api.consumet.org/utils/image-proxy?url=${encodeURIComponent(
item.img
)}&referer=${encodeURIComponent(item.headerForImage.Referer)}`,
page: item.page,
@@ -441,7 +441,7 @@ export async function getServerSideProps(context) {
const data = results.data;
const dat = data.map((item) => ({
- img: `https://cors.moopa.my.id/?url=${encodeURIComponent(
+ img: `https://api.consumet.org/utils/image-proxy?url=${encodeURIComponent(
item.img
)}&referer=${encodeURIComponent(item.headerForImage.Referer)}`,
page: item.page,
diff --git a/styles/globals.css b/styles/globals.css
index a26fbf3..e6d07e2 100644
--- a/styles/globals.css
+++ b/styles/globals.css
@@ -139,7 +139,7 @@ button {
}
.skip-button {
- @apply bg-white xs:w-28 xs:h-9 w-24 h-7 -right-8 -bottom-7 rounded-md font-karla shadow-xl hover:bg-[#f1f1f1] text-black md:static absolute xs:-right-6 xs:-bottom-5 xs:text-[15px] text-xs md:text-sm;
+ @apply bg-white xs:w-28 xs:h-9 w-24 h-7 -top-12 right-[2%] rounded-md font-karla shadow-xl hover:bg-[#f1f1f1] text-black absolute xs:text-[15px] text-xs md:text-sm;
}
.lds-ellipsis {