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

Commit

Permalink
Update v3.9.1 - Merged Beta to Main (#44)
Browse files Browse the repository at this point in the history
* commit

* update db

* Update v3.9.1-beta-v3.1

* Update v3.9.1
  • Loading branch information
DevanAbinaya authored Aug 9, 2023
1 parent bae1f53 commit e740f67
Show file tree
Hide file tree
Showing 17 changed files with 398 additions and 550 deletions.
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,13 @@ git clone https://github.com/DevanAbinaya/Ani-Moopa.git
npm install
```

3. Create `.env` file in the root folder and put this inside the file :
3. Generate Prisma :

```bash
npx prisma generate
```

4. Create `.env` file in the root folder and put this inside the file :

```bash
## AniList
Expand All @@ -114,13 +120,13 @@ DISQUS_SHORTNAME='put your disqus shortname here. (optional)'
DATABASE_URL="Your postgresql connection url"
```

4. Add this endpoint as Redirect Url on AniList Developer :
5. Add this endpoint as Redirect Url on AniList Developer :

```bash
https://your-website-url/api/auth/callback/AniListProvider
```

5. Start local server :
6. Start local server :

```bash
npm run dev
Expand Down
1 change: 1 addition & 0 deletions components/anime/watch/primarySide.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ export default function PrimarySide({
episodeData && (
<VideoPlayer
session={session}
info={info}
data={episodeData}
provider={providerId}
id={watchId}
Expand Down
182 changes: 0 additions & 182 deletions components/dataAni.json

This file was deleted.

17 changes: 12 additions & 5 deletions components/videoPlayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const fontSize = [
];

export default function VideoPlayer({
info,
data,
id,
progress,
Expand Down Expand Up @@ -213,7 +214,7 @@ export default function VideoPlayer({
});

let marked = 0;

art.on("video:playing", () => {
if (!session) return;
const intervalId = setInterval(async () => {
Expand All @@ -225,8 +226,11 @@ export default function VideoPlayer({
watchId: id,
title: track?.playing?.title || aniTitle,
aniTitle: aniTitle,
image: track?.playing?.image,
number: track?.playing?.number,
image:
track?.playing?.image ||
info?.bannerImage ||
info?.coverImage?.extraLarge,
number: Number(progress),
duration: art.duration,
timeWatched: art.currentTime,
provider: provider,
Expand Down Expand Up @@ -256,8 +260,11 @@ export default function VideoPlayer({
watchId: id,
title: track?.playing?.title || aniTitle,
aniTitle: aniTitle,
image: track?.playing?.image,
episode: track?.playing?.number,
image:
track?.playing?.image ||
info?.bannerImage ||
info?.coverImage?.extraLarge,
episode: Number(progress),
duration: art.duration,
timeWatched: art.currentTime,
provider: provider,
Expand Down
10 changes: 2 additions & 8 deletions lib/prisma.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
import { PrismaClient } from "@prisma/client";

const globalForPrisma = globalThis;
export const prisma = global.prisma || new PrismaClient();

const prisma = globalForPrisma.prisma || new PrismaClient();

if (process.env.NODE_ENV !== "production") {
globalForPrisma.prisma = prisma;
}

module.exports = { prisma };
if (process.env.NODE_ENV !== "production") global.prisma = prisma;
2 changes: 1 addition & 1 deletion next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module.exports = withPWA({
},
distDir: process.env.BUILD_DIR || ".next",
trailingSlash: true,
output: 'standalone',
output: "standalone",
// async headers() {
// return [
// {
Expand Down
Loading

0 comments on commit e740f67

Please sign in to comment.