From 2ab259b494f86b5c460497f98daf58bd662c7a10 Mon Sep 17 00:00:00 2001 From: develop202 Date: Fri, 16 Jan 2026 07:45:56 +0800 Subject: [PATCH] =?UTF-8?q?GitHub=E8=8A=82=E7=9B=AE=E5=8D=95=E6=97=A5?= =?UTF-8?q?=E6=9C=9F=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 3 ++- fetchURLByzbpro.js | 1 - utils/playback.js | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index e64fa30..307f015 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,8 @@ 账号🐔了。~~只有标清..~~ 高清为主😅 gitee仓库被改私有了.. ~~gitee ip被ban,仓库链接已失效~~ -仓库地址临时复活,能活多久看运气,目前存在频道缺失或无法播放的问题,回放功能仅migu源生效,还在测试。 + +仓库地址临时复活,能活多久看运气,存在频道缺失或无法播放的问题,回放功能仅migu源生效,还在测试。 访问地址(可回看当天内容) diff --git a/fetchURLByzbpro.js b/fetchURLByzbpro.js index 4df248b..23e2e63 100644 --- a/fetchURLByzbpro.js +++ b/fetchURLByzbpro.js @@ -12,7 +12,6 @@ printMagenta("开始更新...") const datas = await dataList() printGreen("数据获取成功!") - try { const playbackFile = `${process.cwd()}/playback.xml.bak` diff --git a/utils/playback.js b/utils/playback.js index 1151901..158de21 100644 --- a/utils/playback.js +++ b/utils/playback.js @@ -4,8 +4,8 @@ import { cntvNames } from "./datas.js" import { fetchUrl } from "./net.js" -async function getPlaybackData(programId, timeout = 6000) { - const date = new Date() +async function getPlaybackData(programId, timeout = 6000, githubAnd8) { + const date = new Date(Date.now() + githubAnd8) const today = getDateString(date) const resp = await fetchUrl(`https://program-sc.miguvideo.com/live/v2/tv-programs-data/${programId}/${today}`, {}, timeout) return resp.body?.program[0]?.content @@ -13,7 +13,7 @@ async function getPlaybackData(programId, timeout = 6000) { async function updatePlaybackDataByMigu(program, filePath, timeout = 6000, githubAnd8 = 0) { // 今日节目数据 - const playbackData = await getPlaybackData(program.pID, timeout) + const playbackData = await getPlaybackData(program.pID, timeout, githubAnd8) if (!playbackData) { return false } @@ -40,7 +40,7 @@ async function updatePlaybackDataByMigu(program, filePath, timeout = 6000, githu async function updatePlaybackDataByCntv(program, filePath, timeout = 6000, githubAnd8 = 0) { // 今日节目数据 - const date = new Date() + const date = new Date(Date.now() + githubAnd8) const today = getDateString(date) const cntvName = cntvNames[program.name] const resp = await fetchUrl(`https://api.cntv.cn/epg/epginfo3?serviceId=shiyi&d=${today}&c=${cntvName}`, {}, timeout)