fix: update amvstrm url
This commit is contained in:
@@ -5,7 +5,7 @@ export async function getEpisodesFromAmvstrm(
|
||||
): Promise<EpisodesResponse | null> {
|
||||
try {
|
||||
const episodes: Episode[] | null = await fetch(
|
||||
`https://api-amvstrm.nyt92.eu.org/api/v2/episode/${aniListId}`,
|
||||
`https://api.amvstr.me/api/v2/episode/${aniListId}`,
|
||||
)
|
||||
.then((res) => res.json<AmvstrmEpisodesResponse>())
|
||||
.then(({ code, message, episodes }) => {
|
||||
|
||||
@@ -3,9 +3,7 @@ import type { FetchUrlResponse } from "./responseType";
|
||||
export async function getSourcesFromAmvstrm(
|
||||
watchId: string,
|
||||
): Promise<FetchUrlResponse | null> {
|
||||
const source = await fetch(
|
||||
`https://api-amvstrm.nyt92.eu.org/api/v2/stream/${watchId}`,
|
||||
)
|
||||
const source = await fetch(`https://api.amvstr.me/api/v2/stream/${watchId}`)
|
||||
.then((res) => res.json<AmvstrmStreamResponse>())
|
||||
.then(({ stream }) => {
|
||||
const streamObj = stream?.multi;
|
||||
|
||||
@@ -4,7 +4,7 @@ export async function fetchSearchResultsFromAmvstrm(
|
||||
limit: number,
|
||||
) {
|
||||
return fetch(
|
||||
`https://api-amvstrm.nyt92.eu.org/api/v2/search?q=${query}&p=${page}&limit=${limit}`,
|
||||
`https://api.amvstr.me/api/v2/search?q=${query}&p=${page}&limit=${limit}`,
|
||||
)
|
||||
.then((res) => res.json<any>())
|
||||
.then(({ pageInfo: { hasNextPage }, results }) => ({
|
||||
|
||||
@@ -4,8 +4,8 @@ export async function fetchTitleFromAmvstrm(
|
||||
aniListId: number,
|
||||
): Promise<Title | undefined> {
|
||||
return Promise.all([
|
||||
fetch(`https://api-amvstrm.nyt92.eu.org/api/v2/info/${aniListId}`).then(
|
||||
(res) => res.json<any>(),
|
||||
fetch(`https://api.amvstr.me/api/v2/info/${aniListId}`).then((res) =>
|
||||
res.json<any>(),
|
||||
),
|
||||
fetchMissingInformationFromAnify(aniListId).catch((err) => {
|
||||
console.error("Failed to get missing information from Anify", err);
|
||||
|
||||
Reference in New Issue
Block a user