mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-24 02:02:36 -04:00
Update front to not use deprecated apis
This commit is contained in:
parent
d1158cab05
commit
8269d80620
@ -122,6 +122,6 @@ export const MediaInfoPopup = ({
|
||||
};
|
||||
|
||||
MediaInfoPopup.query = (mediaType: string, mediaSlug: string): QueryIdentifier<WatchInfo> => ({
|
||||
path: ["video", mediaType, mediaSlug, "info"],
|
||||
path: [mediaType, mediaSlug, "info"],
|
||||
parser: WatchInfoP,
|
||||
});
|
||||
|
@ -41,7 +41,7 @@ export const useDownloader = () => {
|
||||
// TODO: This methods does not work with auth.
|
||||
const a = document.createElement("a");
|
||||
a.style.display = "none";
|
||||
a.href = `${kyooApiUrl}/video/${type}/${slug}/direct`;
|
||||
a.href = `${kyooApiUrl}/${type}/${slug}/direct`;
|
||||
a.download = `${slug}.${info.extension}`;
|
||||
document.body.appendChild(a);
|
||||
a.click();
|
||||
|
@ -185,7 +185,7 @@ const download = (
|
||||
const task = RNBackgroundDownloader.download({
|
||||
id: id,
|
||||
// TODO: support variant qualities
|
||||
url: `${account.apiUrl}/video/${type}/${slug}/direct`,
|
||||
url: `${account.apiUrl}/${type}/${slug}/direct`,
|
||||
destination: path,
|
||||
headers: {
|
||||
Authorization: account.token.access_token,
|
||||
|
@ -94,7 +94,7 @@ export const useScrubber = (url: string) => {
|
||||
};
|
||||
|
||||
useScrubber.query = (url: string): QueryIdentifier<string> => ({
|
||||
path: ["video", url, "thumbnails.vtt"],
|
||||
path: [url, "thumbnails.vtt"],
|
||||
parser: null!,
|
||||
options: {
|
||||
plainText: true,
|
||||
|
@ -193,7 +193,7 @@ Player.query = (type: "episode" | "movie", slug: string): QueryIdentifier<Item>
|
||||
};
|
||||
|
||||
Player.infoQuery = (type: "episode" | "movie", slug: string): QueryIdentifier<WatchInfo> => ({
|
||||
path: ["video", type, slug, "info"],
|
||||
path: [type, slug, "info"],
|
||||
parser: WatchInfoP,
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user