This repository has been archived by the owner on Jul 14, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ff31a12
commit 1b21aa9
Showing
13 changed files
with
375 additions
and
123 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,18 @@ | ||
## AniList | ||
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 | ||
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" | ||
|
||
## NextJS | ||
PROXY_URI="This is what I use for proxying video https://github.com/chaycee/M3U8Proxy. Don't put / at the end of the url." | ||
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." | ||
DISQUS_SHORTNAME='put your disqus shortname here (optional)' | ||
# ADMIN_USERNAME="" | ||
# ADMIN_USERNAME="Your AniList account username" | ||
|
||
## Prisma | ||
DATABASE_URL="Your postgresql connection url" | ||
## Use any postgresql db, or supabase for free options | ||
DATABASE_URL="postgresql://user:password@host:6543/postgres?pgbouncer=true" | ||
DIRECT_URL="postgresql://user:password@host:5432/postgres" | ||
|
||
## Redis | ||
# If you don't want to use redis, just comment the REDIS_URL (press ctrl + / on windows or cmd + / on mac) | ||
REDIS_URL="redis://username:password@host:port" | ||
REDIS_URL="redis://user:password@host:port" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { META } from "@consumet/extensions" | ||
|
||
const anime = new META.Anilist(); | ||
|
||
export async function getAnimeEpisode(id: string, isDub: boolean) { | ||
try { | ||
const data = await anime.fetchEpisodesListById(id, isDub); | ||
|
||
if (data.length === 0) return null; | ||
|
||
return data; | ||
} catch (error) { | ||
console.log(error); | ||
return null; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { META } from "@consumet/extensions"; | ||
|
||
const anime = new META.Anilist(); | ||
|
||
export async function getAnimeSource(id: string) { | ||
try { | ||
const data = await anime.fetchEpisodeSources(id); | ||
|
||
if (!data) return null; | ||
|
||
return data | ||
} catch (error) { | ||
console.log(error); | ||
return null; | ||
} | ||
} |
Oops, something went wrong.