Skip to content

Commit 72c6363

Browse files
authored
New Color on Website; Add New Video Source; Add Error Message to Watch Page; more...
New Color on Website; Add New Video Source; Add Error Message to Watch Page; more...
2 parents e0b49df + 3832f1a commit 72c6363

File tree

45 files changed

+13981
-4333
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+13981
-4333
lines changed

README.md

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ npm install
6262

6363
3. Now you need to create a `.env.local` file inside the `directory` with the url to where your Consumet API server is setted and configs for your Firebase.
6464
- Check the <a href='https://github.com/consumet/api.consumet.org'>repository of Consumet API</a> and host your own server.
65-
- Do the same with <a href='https://github.com/ghoshRitesh12/aniwatch-api'>Aniwatch API</a>.
65+
- Do the same with <a href='https://github.com/ghoshRitesh12/aniwatch-api'>Aniwatch API</a> and <a href='https://github.com/cool-dev-guy/vidsrc-api'>VidSrc API</a>.
6666
- Go to <a href='https://github.com/manami-project/anime-offline-database'>this repository</a> and get a JSON file filled with Animes info to use.
6767
- This repository already has this json file, but it might be outdated. So get a new file there and put it under the `/app/api/anime-info` directory.
6868
- On Firebase, get your configs to use the Authentication and Firestore Database.
@@ -71,6 +71,7 @@ npm install
7171
```javascript
7272
NEXT_PUBLIC_CONSUMET_API_URL=https://your-hosted-consumet-api-url.com
7373
NEXT_PUBLIC_ANIWATCH_API_URL=https://your-hosted-aniwatch-api-url.com
74+
NEXT_PUBLIC_VIDSRC_API_URL=https://your-hosted-vidsrc-api-url.com
7475
NEXT_PUBLIC_INSIDE_API_URL=https://url-to-where-your-website-is-hosted.com/api/anime-info
7576
NEXT_PUBLIC_FIREBASE_API_KEY=[YOUR-FIREBASE-SETTINGS]
7677
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=[YOUR-FIREBASE-SETTINGS]
@@ -94,42 +95,39 @@ npm run dev
9495

9596
### Home
9697

97-
![Home page 1](https://github.com/ErickLimaS/anime-website/assets/69987890/a5afa4c6-4414-40ac-948a-bf09fd9057cf)
98-
![Home page 2](https://github.com/ErickLimaS/anime-website/assets/69987890/82def7e4-41b7-4d3d-a12e-e9b19c947385)
99-
![Home page 3](https://github.com/ErickLimaS/anime-website/assets/69987890/942a3868-e618-4e78-bc6f-b1e27dc93e3d)
100-
![Home page 4](https://github.com/ErickLimaS/anime-website/assets/69987890/c3547111-ef51-4289-aca8-f12cf7639a1a)
101-
![Home page 5](https://github.com/ErickLimaS/anime-website/assets/69987890/b997120e-7006-4912-bbb2-212f31532d5a)
102-
![Home page 6](https://github.com/ErickLimaS/anime-website/assets/69987890/c2f63bc5-1d56-495f-a262-3f638f7cc8f8)
103-
![Home page 7](https://github.com/ErickLimaS/anime-website/assets/69987890/8e5be52c-5bcd-4149-afc9-794a534f6b66)
98+
![Home page 1](https://github.com/ErickLimaS/anime-website/assets/69987890/b32813e8-db04-4b02-a2b0-088f7348f0db)
99+
![Home page 2](https://github.com/ErickLimaS/anime-website/assets/69987890/a6a1c6f2-f3a3-4d1b-b027-9a053df69c6f)
100+
![Home page 3](https://github.com/ErickLimaS/anime-website/assets/69987890/59f12a6b-1822-4497-a922-904953931d5c)
101+
![Home page 4](https://github.com/ErickLimaS/anime-website/assets/69987890/044fd678-4231-438c-b8c7-2f977fdfbf5b)
102+
![Home page 5](https://github.com/ErickLimaS/anime-website/assets/69987890/22c83fa5-f2bf-45eb-a58b-5e28948519c0)
103+
![Home page 6](https://github.com/ErickLimaS/anime-website/assets/69987890/a06e5474-e966-4ecf-9cee-88e2f794905f)
104104

105105
### Anime/Manga Page
106106

107-
![Anime/Manga Page 1](https://github.com/ErickLimaS/anime-website/assets/69987890/516197d1-b1d3-48da-bac0-415f0e18c232)
108-
![Anime/Manga Page 2](https://github.com/ErickLimaS/anime-website/assets/69987890/f18100b7-29bb-4e4e-9177-02c0fdd49c5e)
109-
![Anime/Manga Page 3](https://github.com/ErickLimaS/anime-website/assets/69987890/e57ef335-b093-43bd-bd0e-2a97840eb002)
110-
![Anime/Manga Page 4](https://github.com/ErickLimaS/anime-website/assets/69987890/e971891e-7dd3-4079-89be-e0e34489389d)
111-
![Anime/Manga Page 5](https://github.com/ErickLimaS/anime-website/assets/69987890/3c4f78fe-e36e-4534-bec0-f5aa8959b7cb)
107+
![Anime/Manga Page 1](https://github.com/ErickLimaS/anime-website/assets/69987890/9f5e1eeb-4cd3-4c0d-8b8e-de5c72c6e44d)
108+
![Anime/Manga Page 2](https://github.com/ErickLimaS/anime-website/assets/69987890/c3ac37db-6e90-4116-a829-8089af20f6d1)
109+
![Anime/Manga Page 3](https://github.com/ErickLimaS/anime-website/assets/69987890/4ebc757e-091e-4c21-9621-5cf04262183a)
110+
![Anime/Manga Page 4](https://github.com/ErickLimaS/anime-website/assets/69987890/61383f33-4acb-45d4-a801-ae87926501aa)
112111

113112
### Watch Episode Page
114113

115-
![Watch Episode Page 1](https://github.com/ErickLimaS/anime-website/assets/69987890/1a8bf99a-3d68-4b11-b5d6-17a0e9099300)
116-
![Watch Episode Page 2](https://github.com/ErickLimaS/anime-website/assets/69987890/1f174cfb-e153-467e-aab0-a6193feab584)
114+
![Watch Episode Page 1](https://github.com/ErickLimaS/anime-website/assets/69987890/491db36e-e655-4c91-970c-59983c546cb3)
115+
![Watch Episode Page 2](https://github.com/ErickLimaS/anime-website/assets/69987890/62c3d7d0-809b-4e09-871e-6c9d2e809f71)
117116

118117
### Search/Filter Page
119118

120-
![Search/Filter Page 1](https://github.com/ErickLimaS/anime-website/assets/69987890/73e09258-c927-43cf-9a02-6ddfb4af5b14)
121-
![Search/Filter Page 2](https://github.com/ErickLimaS/anime-website/assets/69987890/497b35fe-4c6e-464a-9cc4-3a338db9d4cf)
119+
![Search/Filter Page 1](https://github.com/ErickLimaS/anime-website/assets/69987890/32af6c21-ca79-4cb9-9cb9-7b9f30e80302)
122120

123121
### Watchlist Page
124122

125-
![Watchlist page 1](https://github.com/ErickLimaS/anime-website/assets/69987890/395214ba-ed17-4732-899c-0f7347186d76)
123+
![Watchlist Page 1](https://github.com/ErickLimaS/anime-website/assets/69987890/92a95f4b-c0cc-412d-8ad4-4bc89562d6fd)
126124

127125
### News Home Page
128126

129-
![News Home Page 1](https://github.com/ErickLimaS/anime-website/assets/69987890/4dd2c9d4-9c96-4c20-904b-b1abdf71aa37)
130-
![News Home Page 2](https://github.com/ErickLimaS/anime-website/assets/69987890/78a5889e-4fe9-4ebf-bae0-e8c014772196)
131-
![News Home Page 3](https://github.com/ErickLimaS/anime-website/assets/69987890/f6852a01-b012-43f0-a69b-d4c2113988e3)
127+
![News Home Page 1](https://github.com/ErickLimaS/anime-website/assets/69987890/c9567461-a0b3-42dd-bd82-c8ab861145b2)
128+
![News Home Page 2](https://github.com/ErickLimaS/anime-website/assets/69987890/ffcc986f-7aa7-4a77-b5ca-7f3628ff86a3)
129+
![News Home Page 3](https://github.com/ErickLimaS/anime-website/assets/69987890/25738777-ebc0-484d-b387-fd4443bf6cd3)
132130

133131
### News Article Page
134132

135-
![News Article Page 1](https://github.com/ErickLimaS/anime-website/assets/69987890/216eca9e-4e9f-4c9f-9b0d-3ae40cb53772)
133+
![News Article Page 1](https://github.com/ErickLimaS/anime-website/assets/69987890/de58a15a-eed4-4cdc-9249-900a90c21c50)

api/anilist.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ export default {
4747
format?: string,
4848
sort?: string,
4949
showAdultContent?: boolean,
50-
status?: "FINISHED" | "RELEASING" | "NOT_YET_RELEASED" | "CANCELLED" | "HIATUS"
50+
status?: "FINISHED" | "RELEASING" | "NOT_YET_RELEASED" | "CANCELLED" | "HIATUS",
51+
page?: number,
52+
perPage?: number
5153
) => {
5254

5355
const season: string = getCurrentSeason()
@@ -59,11 +61,11 @@ export default {
5961
"variables": {
6062
'type': `${type}`,
6163
'format': `${(format === 'MOVIE' && 'MOVIE') || (type === 'MANGA' && 'MANGA') || (type === 'ANIME' && 'TV')}`,
62-
'page': 1,
64+
'page': page || 1,
6365
'sort': sort || 'POPULARITY_DESC',
64-
'perPage': 20,
65-
'season': `${season}`,
66-
'status': status,
66+
'perPage': perPage || 20,
67+
'season': status ? undefined : `${season}`,
68+
'status': status ? status : undefined,
6769
'seasonYear': `${new Date().getFullYear()}`,
6870
'showAdultContent': showAdultContent || false
6971
}

api/imdb.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ export async function getMediaInfo(search: boolean, mediaId?: string, type?: "TV
5151
method: "GET"
5252
})
5353

54+
// adds ID to be used by Vidsrc API
55+
data.vidsrcId = mediaSearchedId
56+
5457
return data as ImdbMediaInfo
5558

5659
}

api/vidsrc.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import axios from "axios"
2+
3+
const BASE_URL = process.env.NEXT_PUBLIC_VIDSRC_API_URL
4+
5+
export async function getVideoSrcLink(query: string) {
6+
7+
try {
8+
9+
const { data } = await axios.get(`${BASE_URL}/${query}`)
10+
11+
return data
12+
13+
}
14+
catch (error) {
15+
16+
console.log(error)
17+
18+
return null
19+
20+
}
21+
22+
}

0 commit comments

Comments
 (0)