Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions .env.development
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,7 @@ COOKIE_AUTH_CODE = drpys
API_AUTH_NAME = admin
API_AUTH_CODE = drpys
API_PWD = dzyyds
EPG_URL = https://epg.mxdyeah.top/api/diyp/?ch={name}&date={date}
LOGO_URL = https://live.mxdyeah.top/logo/{name}.png
LIVE_URL = 'https://livetv.wqwqwq.sbs/tv.m3u'
# LIVE_URL = './lives/tv.m3u'
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