refactor: replace amvstrm source with aniwatch
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { sortByProperty } from "~/libs/sortByProperty";
|
||||
|
||||
import { type SkipTime, convertSkipTime } from "./convertSkipTime";
|
||||
import {
|
||||
audioPriority,
|
||||
qualityPriority,
|
||||
@@ -37,14 +38,8 @@ export async function getSourcesFromAnify(
|
||||
source,
|
||||
audio,
|
||||
subtitles,
|
||||
intro:
|
||||
typeof intro?.start === "number" && typeof intro?.end === "number"
|
||||
? [intro.start, intro.end].map((seconds) => Math.floor(seconds))
|
||||
: undefined,
|
||||
outro:
|
||||
typeof outro?.start === "number" && typeof outro?.end === "number"
|
||||
? [outro.start, outro.end].map((seconds) => Math.floor(seconds))
|
||||
: undefined,
|
||||
intro: convertSkipTime(intro),
|
||||
outro: convertSkipTime(outro),
|
||||
headers: Object.keys(headers ?? {}).length > 0 ? headers : undefined,
|
||||
};
|
||||
}
|
||||
@@ -58,11 +53,6 @@ interface AnifySourcesResponse {
|
||||
headers?: Record<string, string>;
|
||||
}
|
||||
|
||||
interface SkipTime {
|
||||
start: number;
|
||||
end: number;
|
||||
}
|
||||
|
||||
interface VideoSource {
|
||||
url: string;
|
||||
quality: string;
|
||||
|
||||
Reference in New Issue
Block a user