ADD PLAYLISTS FINNALLY WOO

This commit is contained in:
Ashley //// 2024-02-09 16:47:41 +00:00
parent 43cad3267f
commit 42850dd1e4

View file

@ -53,6 +53,7 @@ const ChannelTabs = {
channels: "Y2hhbm5lbHM=", channels: "Y2hhbm5lbHM=",
store: "c3RvcmU=", store: "c3RvcmU=",
released: "cmVsZWFzZWQ=", released: "cmVsZWFzZWQ=",
playlist:"cGxheWxpc3Rz"
}; };
module.exports = function (app, config, renderTemplate) { module.exports = function (app, config, renderTemplate) {
@ -89,6 +90,7 @@ module.exports = function (app, config, renderTemplate) {
const tab = req.query.tab; const tab = req.query.tab;
const { fetch } = await import("undici"); const { fetch } = await import("undici");
const search = require("google-it");
var media_proxy = config.media_proxy; var media_proxy = config.media_proxy;
if (req.useragent.source.includes("Pardus")) { if (req.useragent.source.includes("Pardus")) {
@ -299,12 +301,16 @@ module.exports = function (app, config, renderTemplate) {
const communityUrl = `${apiUrl}${atob( const communityUrl = `${apiUrl}${atob(
ChannelTabs.community ChannelTabs.community
)}/${ID}/?hl=en-US`; )}/${ID}/?hl=en-US`;
const PlaylistUrl = `${apiUrl}${atob(
ChannelTabs.playlist
)}/${ID}/?hl=en-US`;
const channelINVUrl = `${apiUrl}${ID}/`; const channelINVUrl = `${apiUrl}${ID}/`;
var [tj, shorts, stream, c, cinv] = await Promise.all([ var [tj, shorts, playlist , stream, c, cinv] = await Promise.all([
getChannelData(channelUrl), getChannelData(channelUrl),
getChannelData(shortsUrl), getChannelData(shortsUrl),
getChannelData(PlaylistUrl),
getChannelData(streamUrl), getChannelData(streamUrl),
getChannelData(communityUrl), getChannelData(communityUrl),
getChannelData(channelINVUrl), getChannelData(channelINVUrl),
@ -366,6 +372,7 @@ module.exports = function (app, config, renderTemplate) {
getFirstLine, getFirstLine,
isMobile: req.useragent.isMobile, isMobile: req.useragent.isMobile,
about, about,
playlist,
subs: subs:
typeof subscribers === "string" typeof subscribers === "string"
? subscribers.replace("subscribers", "") ? subscribers.replace("subscribers", "")