diff options
| author | Factiven <[email protected]> | 2023-05-01 16:00:03 +0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-05-01 16:00:03 +0700 |
| commit | 37c438a88efa73f502a0362e3053c95e360e8b9b (patch) | |
| tree | 305dea34094970bcfece03d81d90308c472037b9 | |
| parent | Update v3.5 (diff) | |
| parent | Update v3.5.2 (diff) | |
| download | moopa-37c438a88efa73f502a0362e3053c95e360e8b9b.tar.xz moopa-37c438a88efa73f502a0362e3053c95e360e8b9b.zip | |
Update v3.5.2
Merge pull request #5 from DevanAbinaya/pre-production
| -rw-r--r-- | .github/FUNDING.yml | 2 | ||||
| -rw-r--r-- | README.md | 33 | ||||
| -rw-r--r-- | components/videoPlayer.js | 7 | ||||
| -rw-r--r-- | pages/about.js | 29 | ||||
| -rw-r--r-- | pages/anime/watch/[...info].js | 44 |
5 files changed, 50 insertions, 65 deletions
diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index e10832d..345dc0a 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -10,4 +10,4 @@ liberapay: # Replace with a single Liberapay username issuehunt: # Replace with a single IssueHunt username otechie: # Replace with a single Otechie username lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry -custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] +custom: ["https://trakteer.id/factiven"] @@ -22,10 +22,8 @@ </p> -<p align="center"><a href="https://moopa.live">Moopa</a> is an anime streaming website build with nextjs and tailwindcss with a sleek and modern design that offers Anilist integration to help you keep track of your favorite anime series. Moopa is entirely free and does not feature any ads, making it a great option for you who want an uninterrupted viewing experience.</p> - <p align="center"> - <img src="https://user-images.githubusercontent.com/97084324/234832975-0804e6bd-8528-4f53-b0fb-7ccce5342f59.png" alt="main" width="900"> + <img src="https://user-images.githubusercontent.com/97084324/234832975-0804e6bd-8528-4f53-b0fb-7ccce5342f59.png" alt="main"> </p> <details> @@ -47,6 +45,10 @@ </details> +## Introduction + +<p><a href="https://moopa.live">Moopa</a> is an anime streaming website build with nextjs and tailwindcss with a sleek and modern design that offers Anilist integration to help you keep track of your favorite anime series. Moopa is entirely free and does not feature any ads, making it a great option for you who want an uninterrupted viewing experience.</p> + ## Features - Free ad-supported streaming service @@ -61,32 +63,38 @@ - [x] Connect to consumet API to fetch episodes data - [x] Implement skip op/ed button on supported anime - [x] Create README file -- [ ] Integrate Anilist API for anime tracking +- [x] Integrate Anilist API for anime tracking - [x] Ability to auto track anime after watching >= 90% through the video - [x] Create a user profile page to see lists of anime watched - - [ ] Ability to edit list inside detail page + - [x] Ability to edit list inside detail page - [ ] Working on Manga pages ## For Local Development 1. Clone this repository using : + ```bash git clone https://github.com/DevanAbinaya/Ani-Moopa.git ``` + 2. Install package using npm : + ```bash npm install ``` -3. Create ```.env``` file in the root folder and put this inside the file : + +3. Create `.env` file in the root folder and put this inside the file : + ```bash CLIENT_ID="get the id from here https://anilist.co/settings/developer" CLIENT_SECRET="get the secret from here https://anilist.co/settings/developer" -GRAPHQL_ENDPOINT=https://graphql.anilist.co -NEXTAUTH_SECRET='type this in your bash terminal (openssl rand -base64 32) with no bracket and paste it here' +GRAPHQL_ENDPOINT="https://graphql.anilist.co" +NEXTAUTH_SECRET='run this cmd in your bash terminal (openssl rand -base64 32) with no bracket, and paste it here' NEXTAUTH_URL="for development use http://localhost:3000/ and for production use your domain url" ``` 4. Start local server : + ```bash npm run dev ``` @@ -103,7 +111,12 @@ 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). +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). ## Support This Project -[](https://ko-fi.com/E1E6F9XZ3) + +✨ [Star this project](https://github.com/DevanAbinaya/Ani-Moopa) + +[](https://ko-fi.com/E1E6F9XZ3) +<a href="https://trakteer.id/factiven" target="_blank"><img id="wse-buttons-preview" src="https://cdn.trakteer.id/images/embed/trbtn-red-5.png" height="36" style="border: 0px; height: 36px;" alt="Trakteer Saya"></a> diff --git a/components/videoPlayer.js b/components/videoPlayer.js index b007d95..b6372c2 100644 --- a/components/videoPlayer.js +++ b/components/videoPlayer.js @@ -98,10 +98,17 @@ export default function VideoPlayer({ art.on("video:timeupdate", () => { if (!session) return; + const mediaSession = navigator.mediaSession; const currentTime = art.currentTime; const duration = art.duration; const percentage = currentTime / duration; + mediaSession.setPositionState({ + duration: art.duration, + playbackRate: art.playbackRate, + position: art.currentTime, + }); + // console.log(percentage); if (percentage >= 0.9) { diff --git a/pages/about.js b/pages/about.js index 42690e0..55d7914 100644 --- a/pages/about.js +++ b/pages/about.js @@ -13,35 +13,6 @@ export default function About() { <link rel="icon" href="/c.svg" /> </Head> <Layout> - {/* <div className="mb-[6rem] bg-[#121212] text-white flex min-h-screen w-screen flex-col justify-center gap-8 px-6 pt-nav lg:items-center lg:gap-14"> - <h1 className="place-items-start font-karla text-[3rem] font-bold"> - Hi ! - </h1> - <div className="flex flex-col gap-3 font-roboto text-xl text-[#cdcdcd] lg:mx-52 lg:gap-10 lg:text-2xl"> - <div> - <p className="inline-block font-extrabold text-[#ffffff]"> - Welcome to our website! - </p>{" "} - - </div> - <p> - - </p> - <p> - - </p> - <p> - We are committed to providing a safe and secure environment for - our users. Our website is regularly monitored to prevent any - malicious activities, and we take proactive measures to ensure the - safety of our community. - </p> - <p> - - </p> - </div> - </div> */} - <motion.div initial={{ opacity: 0 }} animate={{ opacity: 1 }} diff --git a/pages/anime/watch/[...info].js b/pages/anime/watch/[...info].js index 0d11684..682e252 100644 --- a/pages/anime/watch/[...info].js +++ b/pages/anime/watch/[...info].js @@ -8,12 +8,9 @@ import dynamic from "next/dynamic"; import { useNotification } from "../../../lib/useNotify"; -import { signIn } from "next-auth/react"; import { getServerSession } from "next-auth/next"; import { authOptions } from "../../api/auth/[...nextauth]"; -import AniList from "../../../components/media/aniList"; - import Skeleton, { SkeletonTheme } from "react-loading-skeleton"; import "react-loading-skeleton/dist/skeleton.css"; @@ -259,28 +256,25 @@ export default function Info({ sessions, id, aniId, provider }) { fetchData(); }, [id, aniId, provider, sessions]); - const { Notification: NotificationComponent } = useNotification(); - - const [open, setOpen] = useState(false); - const [aniStatus, setAniStatus] = useState(""); - const [aniProgress, setAniProgress] = useState(parseInt(playingEpisode)); - - const handleStatus = (e) => { - setAniStatus(e.target.value); - }; - - const handleProgress = (e) => { - const value = parseFloat(e.target.value); - if (!isNaN(value) && value >= 0 && value <= data.totalEpisodes) { - setAniProgress(value); - } - }; - - const handleSubmit = (e) => { - e.preventDefault(); - const formData = { status: aniStatus, progress: aniProgress }; - console.log(formData); - }; + useEffect(() => { + const mediaSession = navigator.mediaSession; + if (!mediaSession) return; + + const artwork = + poster && poster.length > 0 + ? [{ src: poster[0].image, type: "image/jpeg" }] + : undefined; + + mediaSession.metadata = new MediaMetadata({ + title: playingTitle, + artist: `Moopa ${ + playingTitle === data?.title?.romaji + ? "- Episode " + playingEpisode + : `- ${data?.title?.romaji || data?.title?.english}` + }`, + artwork, + }); + }, [poster, playingTitle, playingEpisode, data]); return ( <> |