diff --git a/src/constants/api_constants.ts b/src/constants/api_constants.ts index 6404dc7..dbb4e27 100644 --- a/src/constants/api_constants.ts +++ b/src/constants/api_constants.ts @@ -3,8 +3,10 @@ dotenv.config(); export const tmdbBaseUrl = "https://api.themoviedb.org"; export const tmdbKey = process.env.TMDB_KEY; -export const daddyliveReferrer = "https://lewblivehdplay.ru"; -export const daddyliveUserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36"; -export const daddyliveStreamBaseUrl = "https://webhdrunns.onlinehdhls.ru/lb/premium" +export const daddyliveReferrer = "https://lewblivehdplay.ru/"; +export const daddyliveUserAgent = + "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36"; +export const daddyliveStreamBaseUrl = + "https://webhdrunns.onlinehdhls.ru/lb/premium"; export const daddyliveTrailingUrl = `/index.m3u8?|referer=${daddyliveReferrer}`; -export const daddylive247Url = "https://dlhd.so/24-7-channels.php"; \ No newline at end of file +export const daddylive247Url = "https://dlhd.so/24-7-channels.php"; diff --git a/src/routes/daddylive.ts b/src/routes/daddylive.ts index 315f84a..d32c8c7 100644 --- a/src/routes/daddylive.ts +++ b/src/routes/daddylive.ts @@ -1,10 +1,14 @@ import { FastifyInstance } from "fastify"; import { get247 } from "../providers/daddylive"; -import { daddyliveReferrer, daddyliveStreamBaseUrl, daddyliveTrailingUrl, daddyliveUserAgent } from "../constants/api_constants"; +import { + daddyliveReferrer, + daddyliveStreamBaseUrl, + daddyliveTrailingUrl, + daddyliveUserAgent, +} from "../constants/api_constants"; const routes = async (fastify: FastifyInstance) => { fastify.get("/", async (_, rp) => { - rp.status(200).send({ intro: "Welcome to the daddylive provider", routes: "/live", @@ -14,9 +18,17 @@ const routes = async (fastify: FastifyInstance) => { fastify.get("/live", async (_, rp) => { const channels = await get247(); if (channels) { - rp.status(200).send({base_url: daddyliveStreamBaseUrl, trailing_url: daddyliveTrailingUrl, referrer: daddyliveReferrer, user_agent: daddyliveUserAgent, channels: channels}); + rp.status(200).send({ + base_url: daddyliveStreamBaseUrl, + trailing_url: daddyliveTrailingUrl, + referrer: daddyliveReferrer, + user_agent: daddyliveUserAgent, + channels: channels, + }); } else { - rp.status(500).send({message: "Unknown error occured. Could not fetch channels"}); + rp.status(500).send({ + message: "Unknown error occured. Could not fetch channels", + }); } }); };