Skip to content

添加自定义直播epg、logo配置 #13

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
添加自定义直播epg、logo配置
添加自定义直播epg、logo配置
  • Loading branch information
sanshu-rom authored Dec 31, 2024
commit 7b68c1afa5ac1599145fc2b1468426fb5d2920fd
6 changes: 4 additions & 2 deletions controllers/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ function generateParseJSON(jxDir, requestHost) {
function generateLivesJSON(requestHost) {
let lives = [];
let live_url = process.env.LIVE_URL || '';
let epg_url = process.env.EPG_URL || ''; // 从.env文件读取
let logo_url = process.env.LOGO_URL || ''; // 从.env文件读取
if (live_url && !live_url.startsWith('http')) {
let public_url = urljoin(requestHost, 'public/');
live_url = urljoin(public_url, live_url);
Expand All @@ -138,8 +140,8 @@ function generateLivesJSON(requestHost) {
"url": live_url,
"playerType": 1,
"ua": "okhttp/3.12.13",
"epg": "https://epg.mxdyeah.top/api/diyp/?ch={name}&date={date}",
"logo": "https://live.mxdyeah.top/logo/{name}.png"
"epg": epg_url,
"logo": logo_url
}
)
}
Expand Down