From d508f84954a3de092df9677066715c91272be9d9 Mon Sep 17 00:00:00 2001 From: 3970260761 <3970260761@qq.com> Date: Sun, 8 Nov 2026 00:31:18 +0800 Subject: [PATCH] =?UTF-8?q?fixed74:=20=E7=9B=B4=E6=92=AD=E6=8A=93=E5=8F=96?= =?UTF-8?q?=E5=8A=A0=E9=87=8D=E8=AF=95+=E8=BF=87=E6=9C=9F=E7=BC=93?= =?UTF-8?q?=E5=AD=98=E5=85=9C=E5=BA=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - live-inject.js liveText: 15s单次超时改为25s x 3次重试, 失败打[LIVE-FETCH-RETRY]日志 - liveChannels: 失败/空列表时用过期缓存兜底[LIVE-CH-STALE], 避免前端撞上上游抖动显示暂无频道 - 版本号对齐 fixed74 --- Dockerfile | 2 +- live-inject.js | 17 ++++++++++++++--- public/sw.js | 2 +- src/components/MobileHeader.tsx | 2 +- src/components/TopRightButtons.tsx | 4 ++-- 5 files changed, 19 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index a864daf..fb64e6c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -51,7 +51,7 @@ ENV NODE_ENV=production ENV HOSTNAME=0.0.0.0 ENV PORT=3000 ENV DOCKER_ENV=true -ENV NEXT_PUBLIC_SITE_VERSION=fixed73 +ENV NEXT_PUBLIC_SITE_VERSION=fixed74 # 从构建器中复制 standalone 输出 COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./ diff --git a/live-inject.js b/live-inject.js index 115eb1f..cca00e4 100644 --- a/live-inject.js +++ b/live-inject.js @@ -29,17 +29,28 @@ const all=await liveEpgAll(); const key=EPG_MAP[name]||(all[name]?name:null); if(!key)return{has:false,list:[]}; return{has:true,epg_key:key,list:all[key]||[]}} -async function liveText(u,ms){const c=new AbortController();const t=setTimeout(()=>c.abort(),ms||15000); -try{const r=await fetch(u,{redirect:"follow",signal:c.signal,headers:{"User-Agent":LIVE_UA,"Referer":LIVE_UP+"/"}});return await r.text()}finally{clearTimeout(t)}} +async function liveText(u,ms){const timeout=ms||25000;let lastErr=null; +for(let attempt=1;attempt<=3;attempt++){ +const c=new AbortController();const t=setTimeout(()=>c.abort(),timeout); +try{const r=await fetch(u,{redirect:"follow",signal:c.signal,headers:{"User-Agent":LIVE_UA,"Referer":LIVE_UP+"/"}}); +if(!r.ok)throw new Error("http "+r.status); +const txt=await r.text();clearTimeout(t);return txt} +catch(e){clearTimeout(t);lastErr=e;console.log("[LIVE-FETCH-RETRY]",attempt+"/3",(u||"").slice(0,60),e&&e.message); +if(attempt<3)await new Promise(r=>setTimeout(r,800*attempt))}} +throw lastErr||new Error("fetch failed")} function liveRegion(n){if(/澳门|澳門|澳[視视]|澳亚|莲花/.test(n))return"澳门"; if(/凤凰|TVB|有线|有線|NOW|ViuTV|HOY|港台|香港|明珠|HKS/.test(n))return"香港"; if(/中天|东森|東森|中视|中視|台视|台視|三立|非凡|民视|民視|华视|華視|镜电视|鏡電視|寰宇|TVBS|纬来|緯來|ELEVEN|DAZN|爱尔达|愛爾達/.test(n))return"台湾";return"其他"} async function liveChannels(){ if(liveCh.list&&Date.now()-liveCh.ts<3600e3)return liveCh.list; +try{ const h=await liveText(LIVE_UP+"/?tid=gt");const seen=new Set(),list=[]; for(const m of h.matchAll(/href="\?act=play&(?:amp;)?tid=gt&(?:amp;)?id=(\d+)"[^>]*>\s*([^<]+?)\s*(n=new URL(n+".js",a).href,s[n]||new Promise(s=>{if("document"in self){const e=document.createElement("script");e.src=n,e.onload=s,document.head.appendChild(e)}else e=n,importScripts(n),s()}).then(()=>{let e=s[n];if(!e)throw new Error(`Module ${n} didn’t register its module`);return e}));self.define=(a,i)=>{const c=e||("document"in self?document.currentScript.src:"")||location.href;if(s[c])return;let t={};const o=e=>n(e,c),r={module:{uri:c},exports:t,require:o};s[c]=Promise.all(a.map(e=>r[e]||o(e))).then(e=>(i(...e),t))}}define(["./workbox-e9849328"],function(e){"use strict";importScripts(),self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"/_next/app-build-manifest.json",revision:"be9d54592fea46176d680a09da2f8b03"},{url:"/_next/static/6pApvoOMGhTBhMnIA6395/_buildManifest.js",revision:"85aecd8a55db42fc901f52386fd2a680"},{url:"/_next/static/6pApvoOMGhTBhMnIA6395/_ssgManifest.js",revision:"b6652df95db52feb4daf4eca35380933"},{url:"/_next/static/chunks/151-8711dd3ec7fbfa61.js",revision:"6pApvoOMGhTBhMnIA6395"},{url:"/_next/static/chunks/234-c7c5e76b3553af41.js",revision:"6pApvoOMGhTBhMnIA6395"},{url:"/_next/static/chunks/242-5a0502f47346ed4a.js",revision:"6pApvoOMGhTBhMnIA6395"},{url:"/_next/static/chunks/273-fffc7e5390a1c642.js",revision:"6pApvoOMGhTBhMnIA6395"},{url:"/_next/static/chunks/547-65bdb23e16942a03.js",revision:"6pApvoOMGhTBhMnIA6395"},{url:"/_next/static/chunks/609-46d66c37b95adf6a.js",revision:"6pApvoOMGhTBhMnIA6395"},{url:"/_next/static/chunks/78-b091442d784a205f.js",revision:"6pApvoOMGhTBhMnIA6395"},{url:"/_next/static/chunks/866-7f5b3d6941560701.js",revision:"6pApvoOMGhTBhMnIA6395"},{url:"/_next/static/chunks/app/_not-found/page-2f2263c5b98c190a.js",revision:"6pApvoOMGhTBhMnIA6395"},{url:"/_next/static/chunks/app/admin/page-759806afdd5b7523.js",revision:"6pApvoOMGhTBhMnIA6395"},{url:"/_next/static/chunks/app/config/page-e7450485f43e42b7.js",revision:"6pApvoOMGhTBhMnIA6395"},{url:"/_next/static/chunks/app/douban/page-72adc56cdd9fa67a.js",revision:"6pApvoOMGhTBhMnIA6395"},{url:"/_next/static/chunks/app/filter/page-4cebc2f48c3257a1.js",revision:"6pApvoOMGhTBhMnIA6395"},{url:"/_next/static/chunks/app/ipv6/page-4396f8cd57b55d3b.js",revision:"6pApvoOMGhTBhMnIA6395"},{url:"/_next/static/chunks/app/layout-abad67b72f2d607d.js",revision:"6pApvoOMGhTBhMnIA6395"},{url:"/_next/static/chunks/app/live/page-83b49175a0a9d775.js",revision:"6pApvoOMGhTBhMnIA6395"},{url:"/_next/static/chunks/app/login/page-b2957b92254ae889.js",revision:"6pApvoOMGhTBhMnIA6395"},{url:"/_next/static/chunks/app/page-984f6128015dda92.js",revision:"6pApvoOMGhTBhMnIA6395"},{url:"/_next/static/chunks/app/play/page-4b74435a3843991f.js",revision:"6pApvoOMGhTBhMnIA6395"},{url:"/_next/static/chunks/app/search/page-62b12f466a432302.js",revision:"6pApvoOMGhTBhMnIA6395"},{url:"/_next/static/chunks/app/settings/page-137dd16f391763b9.js",revision:"6pApvoOMGhTBhMnIA6395"},{url:"/_next/static/chunks/app/tvbox/page-125bca4b61639acb.js",revision:"6pApvoOMGhTBhMnIA6395"},{url:"/_next/static/chunks/app/warning/page-e6b20b93b37dc516.js",revision:"6pApvoOMGhTBhMnIA6395"},{url:"/_next/static/chunks/b145b63a-d75d6adf389a7589.js",revision:"6pApvoOMGhTBhMnIA6395"},{url:"/_next/static/chunks/c72274ce-909438a8a5dd87a5.js",revision:"6pApvoOMGhTBhMnIA6395"},{url:"/_next/static/chunks/da9543df-c2ce5269243dd748.js",revision:"6pApvoOMGhTBhMnIA6395"},{url:"/_next/static/chunks/framework-6e06c675866dc992.js",revision:"6pApvoOMGhTBhMnIA6395"},{url:"/_next/static/chunks/main-68795df77d27d928.js",revision:"6pApvoOMGhTBhMnIA6395"},{url:"/_next/static/chunks/main-app-734bbab0f54e7373.js",revision:"6pApvoOMGhTBhMnIA6395"},{url:"/_next/static/chunks/pages/_app-3fcac1a2c632f1ef.js",revision:"6pApvoOMGhTBhMnIA6395"},{url:"/_next/static/chunks/pages/_error-d3fe151bf402c134.js",revision:"6pApvoOMGhTBhMnIA6395"},{url:"/_next/static/chunks/polyfills-42372ed130431b0a.js",revision:"846118c33b2c0e922d7b3a7676f81f6f"},{url:"/_next/static/chunks/webpack-f732225cafd52a05.js",revision:"6pApvoOMGhTBhMnIA6395"},{url:"/_next/static/css/083d238e0b356531.css",revision:"083d238e0b356531"},{url:"/_next/static/css/23100062f5d4aac0.css",revision:"23100062f5d4aac0"},{url:"/_next/static/css/da6e9b4a73108890.css",revision:"da6e9b4a73108890"},{url:"/_next/static/media/19cfc7226ec3afaa-s.woff2",revision:"9dda5cfc9a46f256d0e131bb535e46f8"},{url:"/_next/static/media/21350d82a1f187e9-s.woff2",revision:"4e2553027f1d60eff32898367dd4d541"},{url:"/_next/static/media/8e9860b6e62d6359-s.woff2",revision:"01ba6c2a184b8cba08b0d57167664d75"},{url:"/_next/static/media/ba9851c3c22cd980-s.woff2",revision:"9e494903d6b0ffec1a1e14d34427d44d"},{url:"/_next/static/media/c5fe6dc8356a8c31-s.woff2",revision:"027a89e9ab733a145db70f09b8a18b42"},{url:"/_next/static/media/df0a9ae256c0569c-s.woff2",revision:"d54db44de5ccb18886ece2fda72bdfe0"},{url:"/_next/static/media/e4af272ccee01ff0-s.p.woff2",revision:"65850a373e258f1c897a2b3d75eb74de"},{url:"/favicon.ico",revision:"c5de6e56c5664adda146825f75ea6ecf"},{url:"/hls.min.js",revision:"40a43e1438c4bb85a9629072d31f565a"},{url:"/icons/icon-192x192.png",revision:"4a56c090828a1ad254c903c7aec0389d"},{url:"/icons/icon-256x256.png",revision:"f6409eb1a001f754121e3a8281c0319c"},{url:"/icons/icon-384x384.png",revision:"f6efc3e357b9ffdf4e0d8c14b2ed0ac1"},{url:"/icons/icon-512x512.png",revision:"9c008cbbeb6a576fe07bb1284a83f4d2"},{url:"/logo.png",revision:"40de611b143c47c6291c7bdad2c959ca"},{url:"/manifest.json",revision:"7bd3dabc1cfbfe40f09577efca223d31"},{url:"/mpegts.min.js",revision:"1890007fb6aa0cf34d1b7031a182cc0c"},{url:"/robots.txt",revision:"0483b37fb6cf7455cefe516197e39241"},{url:"/screenshot1.png",revision:"10572bfcea54dc93ac4c5f7c9057fc98"},{url:"/screenshot2.png",revision:"f815a8990973a221899976867365c239"},{url:"/screenshot3.png",revision:"49709e96345dfeeab1d8083821d4b44e"},{url:"/screenshot4.png",revision:"a76c751e41e37556048a487e4f8b8b1c"},{url:"/user-admin.js",revision:"0652dc0e4c870b5deb1e513511eb2d8a"},{url:"/wechat.jpg",revision:"d0f601311802667cd6ca5a37dc69bfa7"}],{ignoreURLParametersMatching:[]}),e.cleanupOutdatedCaches(),e.registerRoute("/",new e.NetworkFirst({cacheName:"start-url",plugins:[{cacheWillUpdate:async({request:e,response:s,event:n,state:a})=>s&&"opaqueredirect"===s.type?new Response(s.body,{status:200,statusText:"OK",headers:s.headers}):s}]}),"GET"),e.registerRoute(/^https:\/\/fonts\.(?:gstatic)\.com\/.*/i,new e.CacheFirst({cacheName:"google-fonts-webfonts",plugins:[new e.ExpirationPlugin({maxEntries:4,maxAgeSeconds:31536e3})]}),"GET"),e.registerRoute(/^https:\/\/fonts\.(?:googleapis)\.com\/.*/i,new e.StaleWhileRevalidate({cacheName:"google-fonts-stylesheets",plugins:[new e.ExpirationPlugin({maxEntries:4,maxAgeSeconds:604800})]}),"GET"),e.registerRoute(/\.(?:eot|otf|ttc|ttf|woff|woff2|font.css)$/i,new e.StaleWhileRevalidate({cacheName:"static-font-assets",plugins:[new e.ExpirationPlugin({maxEntries:4,maxAgeSeconds:604800})]}),"GET"),e.registerRoute(/\.(?:jpg|jpeg|gif|png|svg|ico|webp)$/i,new e.StaleWhileRevalidate({cacheName:"static-image-assets",plugins:[new e.ExpirationPlugin({maxEntries:64,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\/_next\/image\?url=.+$/i,new e.StaleWhileRevalidate({cacheName:"next-image",plugins:[new e.ExpirationPlugin({maxEntries:64,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:mp3|wav|ogg)$/i,new e.CacheFirst({cacheName:"static-audio-assets",plugins:[new e.RangeRequestsPlugin,new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:mp4)$/i,new e.CacheFirst({cacheName:"static-video-assets",plugins:[new e.RangeRequestsPlugin,new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:js)$/i,new e.StaleWhileRevalidate({cacheName:"static-js-assets",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:css|less)$/i,new e.StaleWhileRevalidate({cacheName:"static-style-assets",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\/_next\/data\/.+\/.+\.json$/i,new e.StaleWhileRevalidate({cacheName:"next-data",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:json|xml|csv)$/i,new e.NetworkFirst({cacheName:"static-data-assets",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(({url:e})=>{if(!(self.origin===e.origin))return!1;const s=e.pathname;return!s.startsWith("/api/auth/")&&!!s.startsWith("/api/")},new e.NetworkFirst({cacheName:"apis",networkTimeoutSeconds:10,plugins:[new e.ExpirationPlugin({maxEntries:16,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(({url:e})=>{if(!(self.origin===e.origin))return!1;return!e.pathname.startsWith("/api/")},new e.NetworkFirst({cacheName:"others",networkTimeoutSeconds:10,plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(({url:e})=>!(self.origin===e.origin),new e.NetworkFirst({cacheName:"cross-origin",networkTimeoutSeconds:10,plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:3600})]}),"GET")}); +if(!self.define){let e,s={};const n=(n,i)=>(n=new URL(n+".js",i).href,s[n]||new Promise(s=>{if("document"in self){const e=document.createElement("script");e.src=n,e.onload=s,document.head.appendChild(e)}else e=n,importScripts(n),s()}).then(()=>{let e=s[n];if(!e)throw new Error(`Module ${n} didn’t register its module`);return e}));self.define=(i,a)=>{const c=e||("document"in self?document.currentScript.src:"")||location.href;if(s[c])return;let t={};const r=e=>n(e,c),o={module:{uri:c},exports:t,require:r};s[c]=Promise.all(i.map(e=>o[e]||r(e))).then(e=>(a(...e),t))}}define(["./workbox-e9849328"],function(e){"use strict";importScripts(),self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"/_next/app-build-manifest.json",revision:"85a885cf9d52dfc1f9e7714b1099e163"},{url:"/_next/static/chunks/151-8711dd3ec7fbfa61.js",revision:"npJwqxq3GQJATZ3iINZqR"},{url:"/_next/static/chunks/234-8975aa8e308e2c95.js",revision:"npJwqxq3GQJATZ3iINZqR"},{url:"/_next/static/chunks/242-5a0502f47346ed4a.js",revision:"npJwqxq3GQJATZ3iINZqR"},{url:"/_next/static/chunks/273-fffc7e5390a1c642.js",revision:"npJwqxq3GQJATZ3iINZqR"},{url:"/_next/static/chunks/547-65bdb23e16942a03.js",revision:"npJwqxq3GQJATZ3iINZqR"},{url:"/_next/static/chunks/609-46d66c37b95adf6a.js",revision:"npJwqxq3GQJATZ3iINZqR"},{url:"/_next/static/chunks/78-b091442d784a205f.js",revision:"npJwqxq3GQJATZ3iINZqR"},{url:"/_next/static/chunks/866-7f5b3d6941560701.js",revision:"npJwqxq3GQJATZ3iINZqR"},{url:"/_next/static/chunks/app/_not-found/page-2f2263c5b98c190a.js",revision:"npJwqxq3GQJATZ3iINZqR"},{url:"/_next/static/chunks/app/admin/page-759806afdd5b7523.js",revision:"npJwqxq3GQJATZ3iINZqR"},{url:"/_next/static/chunks/app/config/page-e11c360d4b3b5cc5.js",revision:"npJwqxq3GQJATZ3iINZqR"},{url:"/_next/static/chunks/app/douban/page-72adc56cdd9fa67a.js",revision:"npJwqxq3GQJATZ3iINZqR"},{url:"/_next/static/chunks/app/filter/page-4cebc2f48c3257a1.js",revision:"npJwqxq3GQJATZ3iINZqR"},{url:"/_next/static/chunks/app/ipv6/page-659cd71fb4b9a563.js",revision:"npJwqxq3GQJATZ3iINZqR"},{url:"/_next/static/chunks/app/layout-abad67b72f2d607d.js",revision:"npJwqxq3GQJATZ3iINZqR"},{url:"/_next/static/chunks/app/live/page-63f48c7b5b4e432c.js",revision:"npJwqxq3GQJATZ3iINZqR"},{url:"/_next/static/chunks/app/login/page-b2957b92254ae889.js",revision:"npJwqxq3GQJATZ3iINZqR"},{url:"/_next/static/chunks/app/page-e7df8976ebcc4d71.js",revision:"npJwqxq3GQJATZ3iINZqR"},{url:"/_next/static/chunks/app/play/page-4b74435a3843991f.js",revision:"npJwqxq3GQJATZ3iINZqR"},{url:"/_next/static/chunks/app/search/page-62b12f466a432302.js",revision:"npJwqxq3GQJATZ3iINZqR"},{url:"/_next/static/chunks/app/settings/page-563818cdeb3743df.js",revision:"npJwqxq3GQJATZ3iINZqR"},{url:"/_next/static/chunks/app/tvbox/page-8126310a5c549d37.js",revision:"npJwqxq3GQJATZ3iINZqR"},{url:"/_next/static/chunks/app/warning/page-e6b20b93b37dc516.js",revision:"npJwqxq3GQJATZ3iINZqR"},{url:"/_next/static/chunks/b145b63a-d75d6adf389a7589.js",revision:"npJwqxq3GQJATZ3iINZqR"},{url:"/_next/static/chunks/c72274ce-909438a8a5dd87a5.js",revision:"npJwqxq3GQJATZ3iINZqR"},{url:"/_next/static/chunks/da9543df-c2ce5269243dd748.js",revision:"npJwqxq3GQJATZ3iINZqR"},{url:"/_next/static/chunks/framework-6e06c675866dc992.js",revision:"npJwqxq3GQJATZ3iINZqR"},{url:"/_next/static/chunks/main-68795df77d27d928.js",revision:"npJwqxq3GQJATZ3iINZqR"},{url:"/_next/static/chunks/main-app-734bbab0f54e7373.js",revision:"npJwqxq3GQJATZ3iINZqR"},{url:"/_next/static/chunks/pages/_app-3fcac1a2c632f1ef.js",revision:"npJwqxq3GQJATZ3iINZqR"},{url:"/_next/static/chunks/pages/_error-d3fe151bf402c134.js",revision:"npJwqxq3GQJATZ3iINZqR"},{url:"/_next/static/chunks/polyfills-42372ed130431b0a.js",revision:"846118c33b2c0e922d7b3a7676f81f6f"},{url:"/_next/static/chunks/webpack-f732225cafd52a05.js",revision:"npJwqxq3GQJATZ3iINZqR"},{url:"/_next/static/css/23100062f5d4aac0.css",revision:"23100062f5d4aac0"},{url:"/_next/static/css/50ddca8f740c6eb6.css",revision:"50ddca8f740c6eb6"},{url:"/_next/static/css/da6e9b4a73108890.css",revision:"da6e9b4a73108890"},{url:"/_next/static/media/19cfc7226ec3afaa-s.woff2",revision:"9dda5cfc9a46f256d0e131bb535e46f8"},{url:"/_next/static/media/21350d82a1f187e9-s.woff2",revision:"4e2553027f1d60eff32898367dd4d541"},{url:"/_next/static/media/8e9860b6e62d6359-s.woff2",revision:"01ba6c2a184b8cba08b0d57167664d75"},{url:"/_next/static/media/ba9851c3c22cd980-s.woff2",revision:"9e494903d6b0ffec1a1e14d34427d44d"},{url:"/_next/static/media/c5fe6dc8356a8c31-s.woff2",revision:"027a89e9ab733a145db70f09b8a18b42"},{url:"/_next/static/media/df0a9ae256c0569c-s.woff2",revision:"d54db44de5ccb18886ece2fda72bdfe0"},{url:"/_next/static/media/e4af272ccee01ff0-s.p.woff2",revision:"65850a373e258f1c897a2b3d75eb74de"},{url:"/_next/static/npJwqxq3GQJATZ3iINZqR/_buildManifest.js",revision:"85aecd8a55db42fc901f52386fd2a680"},{url:"/_next/static/npJwqxq3GQJATZ3iINZqR/_ssgManifest.js",revision:"b6652df95db52feb4daf4eca35380933"},{url:"/favicon.ico",revision:"c5de6e56c5664adda146825f75ea6ecf"},{url:"/hls.min.js",revision:"40a43e1438c4bb85a9629072d31f565a"},{url:"/icons/icon-192x192.png",revision:"4a56c090828a1ad254c903c7aec0389d"},{url:"/icons/icon-256x256.png",revision:"f6409eb1a001f754121e3a8281c0319c"},{url:"/icons/icon-384x384.png",revision:"f6efc3e357b9ffdf4e0d8c14b2ed0ac1"},{url:"/icons/icon-512x512.png",revision:"9c008cbbeb6a576fe07bb1284a83f4d2"},{url:"/logo.png",revision:"40de611b143c47c6291c7bdad2c959ca"},{url:"/manifest.json",revision:"7bd3dabc1cfbfe40f09577efca223d31"},{url:"/mpegts.min.js",revision:"1890007fb6aa0cf34d1b7031a182cc0c"},{url:"/robots.txt",revision:"0483b37fb6cf7455cefe516197e39241"},{url:"/screenshot1.png",revision:"10572bfcea54dc93ac4c5f7c9057fc98"},{url:"/screenshot2.png",revision:"f815a8990973a221899976867365c239"},{url:"/screenshot3.png",revision:"49709e96345dfeeab1d8083821d4b44e"},{url:"/screenshot4.png",revision:"a76c751e41e37556048a487e4f8b8b1c"},{url:"/user-admin.js",revision:"0652dc0e4c870b5deb1e513511eb2d8a"},{url:"/wechat.jpg",revision:"d0f601311802667cd6ca5a37dc69bfa7"}],{ignoreURLParametersMatching:[]}),e.cleanupOutdatedCaches(),e.registerRoute("/",new e.NetworkFirst({cacheName:"start-url",plugins:[{cacheWillUpdate:async({request:e,response:s,event:n,state:i})=>s&&"opaqueredirect"===s.type?new Response(s.body,{status:200,statusText:"OK",headers:s.headers}):s}]}),"GET"),e.registerRoute(/^https:\/\/fonts\.(?:gstatic)\.com\/.*/i,new e.CacheFirst({cacheName:"google-fonts-webfonts",plugins:[new e.ExpirationPlugin({maxEntries:4,maxAgeSeconds:31536e3})]}),"GET"),e.registerRoute(/^https:\/\/fonts\.(?:googleapis)\.com\/.*/i,new e.StaleWhileRevalidate({cacheName:"google-fonts-stylesheets",plugins:[new e.ExpirationPlugin({maxEntries:4,maxAgeSeconds:604800})]}),"GET"),e.registerRoute(/\.(?:eot|otf|ttc|ttf|woff|woff2|font.css)$/i,new e.StaleWhileRevalidate({cacheName:"static-font-assets",plugins:[new e.ExpirationPlugin({maxEntries:4,maxAgeSeconds:604800})]}),"GET"),e.registerRoute(/\.(?:jpg|jpeg|gif|png|svg|ico|webp)$/i,new e.StaleWhileRevalidate({cacheName:"static-image-assets",plugins:[new e.ExpirationPlugin({maxEntries:64,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\/_next\/image\?url=.+$/i,new e.StaleWhileRevalidate({cacheName:"next-image",plugins:[new e.ExpirationPlugin({maxEntries:64,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:mp3|wav|ogg)$/i,new e.CacheFirst({cacheName:"static-audio-assets",plugins:[new e.RangeRequestsPlugin,new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:mp4)$/i,new e.CacheFirst({cacheName:"static-video-assets",plugins:[new e.RangeRequestsPlugin,new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:js)$/i,new e.StaleWhileRevalidate({cacheName:"static-js-assets",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:css|less)$/i,new e.StaleWhileRevalidate({cacheName:"static-style-assets",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\/_next\/data\/.+\/.+\.json$/i,new e.StaleWhileRevalidate({cacheName:"next-data",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(/\.(?:json|xml|csv)$/i,new e.NetworkFirst({cacheName:"static-data-assets",plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(({url:e})=>{if(!(self.origin===e.origin))return!1;const s=e.pathname;return!s.startsWith("/api/auth/")&&!!s.startsWith("/api/")},new e.NetworkFirst({cacheName:"apis",networkTimeoutSeconds:10,plugins:[new e.ExpirationPlugin({maxEntries:16,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(({url:e})=>{if(!(self.origin===e.origin))return!1;return!e.pathname.startsWith("/api/")},new e.NetworkFirst({cacheName:"others",networkTimeoutSeconds:10,plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:86400})]}),"GET"),e.registerRoute(({url:e})=>!(self.origin===e.origin),new e.NetworkFirst({cacheName:"cross-origin",networkTimeoutSeconds:10,plugins:[new e.ExpirationPlugin({maxEntries:32,maxAgeSeconds:3600})]}),"GET")}); diff --git a/src/components/MobileHeader.tsx b/src/components/MobileHeader.tsx index 9a5cb37..60c2b83 100644 --- a/src/components/MobileHeader.tsx +++ b/src/components/MobileHeader.tsx @@ -27,7 +27,7 @@ const MobileHeader = ({ showBackButton = false }: MobileHeaderProps) => { className='shrink-0 select-none rounded-md px-1.5 py-0.5 text-[10px] font-bold tracking-wide text-purple-600 dark:text-purple-400 bg-purple-500/10 border border-purple-500/20' title='米视TV 当前版本' > - v{process.env.NEXT_PUBLIC_SITE_VERSION || 'fixed73'} + v{process.env.NEXT_PUBLIC_SITE_VERSION || 'fixed74'} diff --git a/src/components/TopRightButtons.tsx b/src/components/TopRightButtons.tsx index d5c0eab..7682b7c 100644 --- a/src/components/TopRightButtons.tsx +++ b/src/components/TopRightButtons.tsx @@ -20,7 +20,7 @@ export default function TopRightButtons({ variant = 'bar' }: TopRightButtonsProp className='shrink-0 select-none rounded-md px-1.5 py-1 text-[10px] font-bold tracking-wide text-purple-300 bg-purple-500/20 border border-purple-400/30' title='米视TV 当前版本' > - v{process.env.NEXT_PUBLIC_SITE_VERSION || 'fixed73'} + v{process.env.NEXT_PUBLIC_SITE_VERSION || 'fixed74'} @@ -43,7 +43,7 @@ export default function TopRightButtons({ variant = 'bar' }: TopRightButtonsProp className='hidden lg:inline-flex shrink-0 items-center select-none rounded-lg px-2 py-1.5 text-xs font-bold tracking-wide text-purple-600 dark:text-purple-400 bg-purple-500/10 border border-purple-500/20' title='米视TV 当前版本' > - v{process.env.NEXT_PUBLIC_SITE_VERSION || 'fixed73'} + v{process.env.NEXT_PUBLIC_SITE_VERSION || 'fixed74'}