Skip to content

Commit 6475a47

Browse files
authored
添加自定义直播epg、logo配置
添加自定义直播epg、logo配置
1 parent b7b8099 commit 6475a47

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Diff for: controllers/config.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,8 @@ function generateParseJSON(jxDir, requestHost) {
125125
function generateLivesJSON(requestHost) {
126126
let lives = [];
127127
let live_url = process.env.LIVE_URL || '';
128+
let epg_url = process.env.EPG_URL || ''; // 从.env文件读取
129+
let logo_url = process.env.LOGO_URL || ''; // 从.env文件读取
128130
if (live_url && !live_url.startsWith('http')) {
129131
let public_url = urljoin(requestHost, 'public/');
130132
live_url = urljoin(public_url, live_url);
@@ -138,8 +140,8 @@ function generateLivesJSON(requestHost) {
138140
"url": live_url,
139141
"playerType": 1,
140142
"ua": "okhttp/3.12.13",
141-
"epg": "https://epg.mxdyeah.top/api/diyp/?ch={name}&date={date}",
142-
"logo": "https://live.mxdyeah.top/logo/{name}.png"
143+
"epg": epg_url,
144+
"logo": logo_url
143145
}
144146
)
145147
}

0 commit comments

Comments
 (0)