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