This commit is contained in:
himanshu8443
2025-06-16 22:26:38 +05:30
parent 3f3e12f5df
commit 2a4aa2a680
185 changed files with 4645 additions and 3952 deletions

View File

@@ -0,0 +1,20 @@
export const catalog = [
{
title: "Latest",
filter: "/api/DramaList/List?type=0&sub=0&country=0&status=0&order=2",
},
{
title: "Hollywood",
filter: "/api/DramaList/List?type=4&sub=0&country=0&status=0&order=2",
},
{
title: "Anime",
filter: "/api/DramaList/List?type=3&sub=0&country=0&status=0&order=2",
},
{
title: "K Drama",
filter: "/api/DramaList/List?type=0&sub=0&country=0&status=0&order=2",
},
];
export const genres = [];

View File

@@ -1,14 +0,0 @@
import {kisskhCatalog, kisskhGenresList} from './kissKhCatalog';
import {kissKhGetInfo} from './kissKhGetInfo';
import {kissKhGetPosts, kissKhGetPostsSearch} from './kissKhGetPosts';
import {kissKhGetStream} from './kissKhGetStream';
import {ProviderType} from '../types';
export const kissKhProvider: ProviderType = {
catalog: kisskhCatalog,
genres: kisskhGenresList,
GetHomePosts: kissKhGetPosts,
GetMetaData: kissKhGetInfo,
GetStream: kissKhGetStream,
GetSearchPosts: kissKhGetPostsSearch,
};

View File

@@ -1,20 +0,0 @@
export const kisskhCatalog = [
{
title: 'Latest',
filter: '/api/DramaList/List?type=0&sub=0&country=0&status=0&order=2',
},
{
title: 'Hollywood',
filter: '/api/DramaList/List?type=4&sub=0&country=0&status=0&order=2',
},
{
title: 'Anime',
filter: '/api/DramaList/List?type=3&sub=0&country=0&status=0&order=2',
},
{
title: 'K Drama',
filter: '/api/DramaList/List?type=0&sub=0&country=0&status=0&order=2',
},
];
export const kisskhGenresList = [];

View File

@@ -1,6 +1,6 @@
import {Info, Link, ProviderContext} from '../types';
import { Info, Link, ProviderContext } from "../types";
export const kissKhGetInfo = async function ({
export const getMeta = async function ({
link,
providerContext,
}: {
@@ -8,23 +8,23 @@ export const kissKhGetInfo = async function ({
providerContext: ProviderContext;
}): Promise<Info> {
try {
const {axios} = providerContext;
const { axios } = providerContext;
const res = await axios.get(link);
const data = res.data;
const meta = {
title: data.title,
synopsis: data.description,
image: data.thumbnail,
tags: [data?.releaseDate?.split('-')[0], data?.status, data?.type],
imdbId: '',
type: data.episodesCount > 1 ? 'series' : 'movie',
tags: [data?.releaseDate?.split("-")[0], data?.status, data?.type],
imdbId: "",
type: data.episodesCount > 1 ? "series" : "movie",
};
const linkList: Link[] = [];
const subLinks: Link['directLinks'] = [];
const subLinks: Link["directLinks"] = [];
data?.episodes?.reverse().map((episode: any) => {
const title = 'Episode ' + episode?.number;
const title = "Episode " + episode?.number;
const link = episode?.id?.toString();
if (link && title) {
subLinks.push({
@@ -46,11 +46,11 @@ export const kissKhGetInfo = async function ({
} catch (err) {
console.error(err);
return {
title: '',
synopsis: '',
image: '',
imdbId: '',
type: 'movie',
title: "",
synopsis: "",
image: "",
imdbId: "",
type: "movie",
linkList: [],
};
}

View File

@@ -1,6 +1,6 @@
import {Post, ProviderContext} from '../types';
import { Post, ProviderContext } from "../types";
export const kissKhGetPosts = async function ({
export const getPosts = async function ({
filter,
signal,
providerContext,
@@ -11,11 +11,11 @@ export const kissKhGetPosts = async function ({
signal: AbortSignal;
providerContext: ProviderContext;
}): Promise<Post[]> {
const {getBaseUrl, axios} = providerContext;
const baseUrl = await getBaseUrl('kissKh');
const { getBaseUrl, axios } = providerContext;
const baseUrl = await getBaseUrl("kissKh");
const url = `${baseUrl + filter}&type=0`;
try {
const res = await axios.get(url, {signal});
const res = await axios.get(url, { signal });
const data = res.data?.data;
const catalog: Post[] = [];
data?.map((element: any) => {
@@ -32,12 +32,12 @@ export const kissKhGetPosts = async function ({
});
return catalog;
} catch (err) {
console.error('kiss error ', err);
console.error("kiss error ", err);
return [];
}
};
export const kissKhGetPostsSearch = async function ({
export const getSearchPosts = async function ({
searchQuery,
signal,
providerContext,
@@ -48,11 +48,11 @@ export const kissKhGetPostsSearch = async function ({
signal: AbortSignal;
providerContext: ProviderContext;
}): Promise<Post[]> {
const {getBaseUrl, axios} = providerContext;
const baseUrl = await getBaseUrl('kissKh');
const { getBaseUrl, axios } = providerContext;
const baseUrl = await getBaseUrl("kissKh");
const url = `${baseUrl}/api/DramaList/Search?q=${searchQuery}&type=0`;
try {
const res = await axios.get(url, {signal});
const res = await axios.get(url, { signal });
const data = res.data;
const catalog: Post[] = [];
data?.map((element: any) => {
@@ -69,7 +69,7 @@ export const kissKhGetPostsSearch = async function ({
});
return catalog;
} catch (err) {
console.error('kiss error ', err);
console.error("kiss error ", err);
return [];
}
};

View File

@@ -1,6 +1,6 @@
import {Stream, ProviderContext, TextTrackType, TextTracks} from '../types';
import { Stream, ProviderContext, TextTrackType, TextTracks } from "../types";
export const kissKhGetStream = async function ({
export const getStream = async function ({
link: id,
providerContext,
}: {
@@ -8,12 +8,12 @@ export const kissKhGetStream = async function ({
providerContext: ProviderContext;
}): Promise<Stream[]> {
try {
const {axios, getBaseUrl} = providerContext;
const { axios, getBaseUrl } = providerContext;
const streamLinks: Stream[] = [];
const subtitles: TextTracks = [];
const baseUrl = await getBaseUrl('kissKh');
const baseUrl = await getBaseUrl("kissKh");
const streamUrl =
'https://adorable-salamander-ecbb21.netlify.app/api/kisskh/video?id=' +
"https://adorable-salamander-ecbb21.netlify.app/api/kisskh/video?id=" +
id;
const res = await axios.get(streamUrl);
const stream = res.data?.source?.Video;
@@ -22,16 +22,16 @@ export const kissKhGetStream = async function ({
subtitles.push({
title: sub?.label,
language: sub?.land,
type: sub?.src?.includes('.vtt')
type: sub?.src?.includes(".vtt")
? TextTrackType.VTT
: TextTrackType.SUBRIP,
uri: sub?.src,
});
});
streamLinks.push({
server: 'kissKh',
server: "kissKh",
link: stream,
type: 'm3u8',
type: "m3u8",
subtitles,
headers: {
referer: baseUrl,