This commit is contained in:
himanshu8443
2025-06-15 21:29:40 +05:30
commit 3f3e12f5df
299 changed files with 18729 additions and 0 deletions

14
dist/dooflix/dooCatalog.js vendored Normal file
View File

@@ -0,0 +1,14 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.dooGenresList = exports.dooCatalog = void 0;
exports.dooCatalog = [
{
title: 'Series',
filter: '/rest-api//v130/tvseries',
},
{
title: 'Movies',
filter: '/rest-api//v130/movies',
},
];
exports.dooGenresList = [];

79
dist/dooflix/dooGetInfo.js vendored Normal file
View File

@@ -0,0 +1,79 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.dooGetInfo = void 0;
const headers = {
'Accept-Encoding': 'gzip',
'API-KEY': '2pm95lc6prpdbk0ppji9rsqo',
Connection: 'Keep-Alive',
'If-Modified-Since': 'Wed, 14 Aug 2024 13:00:04 GMT',
'User-Agent': 'okhttp/3.14.9',
};
const dooGetInfo = async function ({ link, providerContext, }) {
try {
const { axios } = providerContext;
const res = await axios.get(link, { headers });
const resData = res.data;
const jsonStart = resData?.indexOf('{');
const jsonEnd = resData?.lastIndexOf('}') + 1;
const data = JSON?.parse(resData?.substring(jsonStart, jsonEnd))?.title
? JSON?.parse(resData?.substring(jsonStart, jsonEnd))
: resData;
const title = data?.title || '';
const synopsis = data?.description || '';
const image = data?.poster_url || '';
const cast = data?.cast || [];
const rating = data?.imdb_rating || '';
const type = Number(data?.is_tvseries) ? 'series' : 'movie';
const tags = data?.genre?.map((genre) => genre?.name) || [];
const links = [];
if (type === 'series') {
data?.season?.map((season) => {
const title = season?.seasons_name || '';
const directLinks = season?.episodes?.map((episode) => ({
title: episode?.episodes_name,
link: episode?.file_url,
})) || [];
links.push({
title: title,
directLinks: directLinks,
});
});
}
else {
data?.videos?.map((video) => {
links.push({
title: title + ' ' + video?.label,
directLinks: [
{
title: 'Play',
link: video?.file_url,
},
],
});
});
}
return {
image: image?.includes('https') ? image : image?.replace('http', 'https'),
synopsis: synopsis,
title: title,
rating: rating,
imdbId: '',
cast: cast,
tags: tags,
type: type,
linkList: links,
};
}
catch (err) {
console.error(err);
return {
title: '',
synopsis: '',
image: '',
imdbId: '',
type: 'movie',
linkList: [],
};
}
};
exports.dooGetInfo = dooGetInfo;

140
dist/dooflix/dooGetPosts.js vendored Normal file
View File

@@ -0,0 +1,140 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.dooGetSearchPost = exports.dooGetPost = void 0;
const headers = {
'Accept-Encoding': 'gzip',
'API-KEY': '2pm95lc6prpdbk0ppji9rsqo',
Connection: 'Keep-Alive',
'If-Modified-Since': 'Wed, 14 Aug 2024 13:00:04 GMT',
'User-Agent': 'okhttp/3.14.9',
};
const dooGetPost = async function ({ filter, page, signal, providerContext, }) {
try {
const { axios, getBaseUrl } = providerContext;
const baseUrl = await getBaseUrl('dooflix');
const catalog = [];
const url = `${baseUrl + filter + `?page=${page}`}`;
const res = await axios.get(url, { headers, signal });
const resData = res.data;
if (!resData || typeof resData !== 'string') {
console.warn('Unexpected response format from dooflix API');
return [];
}
let data;
try {
const jsonStart = resData.indexOf('[');
const jsonEnd = resData.lastIndexOf(']') + 1;
if (jsonStart === -1 || jsonEnd <= jsonStart) {
// If we can't find valid JSON array markers, try parsing the entire response
data = JSON.parse(resData);
}
else {
const jsonSubstring = resData.substring(jsonStart, jsonEnd);
const parsedArray = JSON.parse(jsonSubstring);
data = parsedArray.length > 0 ? parsedArray : resData;
}
}
catch (parseError) {
console.error('Error parsing dooflix response:', parseError);
return [];
}
if (!Array.isArray(data)) {
console.warn('Unexpected data format from dooflix API');
return [];
}
data.forEach((result) => {
const id = result?.videos_id;
if (!id)
return;
const type = !result?.is_tvseries ? 'tvseries' : 'movie';
const link = `${baseUrl}/rest-api//v130/single_details?type=${type}&id=${id}`;
const thumbnailUrl = result?.thumbnail_url;
const image = thumbnailUrl?.includes('https')
? thumbnailUrl
: thumbnailUrl?.replace('http', 'https');
catalog.push({
title: result?.title || '',
link,
image,
});
});
return catalog;
}
catch (err) {
console.error('dooflix error:', err);
return [];
}
};
exports.dooGetPost = dooGetPost;
const dooGetSearchPost = async function ({ searchQuery, page, providerContext, signal, }) {
try {
if (page > 1) {
return [];
}
const { axios, getBaseUrl } = providerContext;
const catalog = [];
const baseUrl = await getBaseUrl('dooflix');
const url = `${baseUrl}/rest-api//v130/search?q=${searchQuery}&type=movietvserieslive&range_to=0&range_from=0&tv_category_id=0&genre_id=0&country_id=0`;
const res = await axios.get(url, { headers, signal });
const resData = res.data;
if (!resData || typeof resData !== 'string') {
console.warn('Unexpected search response format from dooflix API');
return [];
}
let data;
try {
const jsonStart = resData.indexOf('{');
const jsonEnd = resData.lastIndexOf('}') + 1;
if (jsonStart === -1 || jsonEnd <= jsonStart) {
data = resData;
}
else {
const jsonSubstring = resData.substring(jsonStart, jsonEnd);
const parsedData = JSON.parse(jsonSubstring);
data = parsedData?.movie ? parsedData : resData;
}
}
catch (parseError) {
console.error('Error parsing dooflix search response:', parseError);
return [];
}
// Process movies
data?.movie?.forEach((result) => {
const id = result?.videos_id;
if (!id)
return;
const link = `${baseUrl}/rest-api//v130/single_details?type=movie&id=${id}`;
const thumbnailUrl = result?.thumbnail_url;
const image = thumbnailUrl?.includes('https')
? thumbnailUrl
: thumbnailUrl?.replace('http', 'https');
catalog.push({
title: result?.title || '',
link,
image,
});
});
// Process TV series
data?.tvseries?.forEach((result) => {
const id = result?.videos_id;
if (!id)
return;
const link = `${baseUrl}/rest-api//v130/single_details?type=tvseries&id=${id}`;
const thumbnailUrl = result?.thumbnail_url;
const image = thumbnailUrl?.includes('https')
? thumbnailUrl
: thumbnailUrl?.replace('http', 'https');
catalog.push({
title: result?.title || '',
link,
image,
});
});
return catalog;
}
catch (error) {
console.error('dooflix search error:', error);
return [];
}
};
exports.dooGetSearchPost = dooGetSearchPost;

26
dist/dooflix/dooGetSteam.js vendored Normal file
View File

@@ -0,0 +1,26 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.dooGetStream = void 0;
const dooGetStream = async function ({ link, }) {
try {
const streams = [];
streams.push({
server: 'Dooflix',
link: link,
type: 'm3u8',
headers: {
Connection: 'Keep-Alive',
'User-Agent': 'Mozilla/5.0 (WindowsNT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.37',
Referer: 'https://molop.art/',
Cookie: 'cf_clearance=M2_2Hy4lKRy_ruRX3dzOgm3iho1FHe2DUC1lq28BUtI-1737377622-1.2.1.1-6R8RaH94._H2BuNuotsjTZ3fAF6cLwPII0guemu9A5Xa46lpCJPuELycojdREwoonYS2kRTYcZ9_1c4h4epi2LtDvMM9jIoOZKE9pIdWa30peM1hRMpvffTjGUCraHsJNCJez8S_QZ6XkkdP7GeQ5iwiYaI6Grp6qSJWoq0Hj8lS7EITZ1LzyrALI6iLlYjgLmgLGa1VuhORWJBN8ZxrJIZ_ba_pqbrR9fjnyToqxZ0XQaZfk1d3rZyNWoZUjI98GoAxVjnKtcBQQG6b2jYPJuMbbYraGoa54N7E7BR__7o',
},
});
console.log('doo streams', streams);
return streams;
}
catch (err) {
console.error(err);
return [];
}
};
exports.dooGetStream = dooGetStream;

15
dist/dooflix/index.js vendored Normal file
View File

@@ -0,0 +1,15 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.dooflixProvider = void 0;
const dooCatalog_1 = require("./dooCatalog");
const dooGetInfo_1 = require("./dooGetInfo");
const dooGetPosts_1 = require("./dooGetPosts");
const dooGetSteam_1 = require("./dooGetSteam");
exports.dooflixProvider = {
catalog: dooCatalog_1.dooCatalog,
genres: dooCatalog_1.dooGenresList,
GetMetaData: dooGetInfo_1.dooGetInfo,
GetStream: dooGetSteam_1.dooGetStream,
GetHomePosts: dooGetPosts_1.dooGetPost,
GetSearchPosts: dooGetPosts_1.dooGetSearchPost,
};