Compare commits

...
5 Commits
Author SHA1 Message Date
jinghui 18953ebc9a fix: /filter 页数据不显示(reset时未追加arr) (fixed117)
Docker Build & Test / build (push) Canceled after 0s
Docker Build & Test / test (push) Canceled after 0s
Build & Push Docker image / build-and-push (linux/amd64) (push) Canceled after 0s
Build & Push Docker image / build-and-push (linux/arm/v7) (push) Canceled after 0s
Build & Push Docker image / build-and-push (linux/arm64) (push) Canceled after 0s
Build & Push Docker image / merge-images (push) Canceled after 0s
Release / release (push) Canceled after 0s
Release / docker (push) Canceled after 0s
2026-11-10 15:56:52 +08:00
jinghui 566ee297d9 perf: /api/tvbox/all 增加60s进程内响应缓存,栏目秒开 (fixed110)
Docker Build & Test / build (push) Canceled after 0s
Docker Build & Test / test (push) Canceled after 0s
Build & Push Docker image / build-and-push (linux/amd64) (push) Canceled after 0s
Build & Push Docker image / build-and-push (linux/arm/v7) (push) Canceled after 0s
Build & Push Docker image / build-and-push (linux/arm64) (push) Canceled after 0s
Build & Push Docker image / merge-images (push) Canceled after 0s
Release / release (push) Canceled after 0s
Release / docker (push) Canceled after 0s
2026-11-10 14:57:12 +08:00
jinghui b734661e47 fix: 管理员(owner)最后登录时间显示 (fixed109)
Docker Build & Test / build (push) Canceled after 0s
Docker Build & Test / test (push) Canceled after 0s
Build & Push Docker image / build-and-push (linux/amd64) (push) Canceled after 0s
Build & Push Docker image / build-and-push (linux/arm/v7) (push) Canceled after 0s
Build & Push Docker image / build-and-push (linux/arm64) (push) Canceled after 0s
Build & Push Docker image / merge-images (push) Canceled after 0s
Release / release (push) Canceled after 0s
Release / docker (push) Canceled after 0s
2026-11-10 14:52:16 +08:00
jinghui 9dbe231c79 fix: 启用新用户注册 (redis 存储 + ENABLE_REGISTER) fixed108
Docker Build & Test / build (push) Canceled after 0s
Docker Build & Test / test (push) Canceled after 0s
Build & Push Docker image / build-and-push (linux/amd64) (push) Canceled after 0s
Build & Push Docker image / build-and-push (linux/arm/v7) (push) Canceled after 0s
Build & Push Docker image / build-and-push (linux/arm64) (push) Canceled after 0s
Build & Push Docker image / merge-images (push) Canceled after 0s
Release / release (push) Canceled after 0s
Release / docker (push) Canceled after 0s
2026-11-10 14:17:40 +08:00
jinghui 2b3582b4ff fix: 恢复登录鉴权 + 站名米视TV + 首访 IPv6 跳转 tv6 (fixed107)
Docker Build & Test / build (push) Canceled after 0s
Docker Build & Test / test (push) Canceled after 0s
Build & Push Docker image / build-and-push (linux/amd64) (push) Canceled after 0s
Build & Push Docker image / build-and-push (linux/arm/v7) (push) Canceled after 0s
Build & Push Docker image / build-and-push (linux/arm64) (push) Canceled after 0s
Build & Push Docker image / merge-images (push) Canceled after 0s
Release / release (push) Canceled after 0s
Release / docker (push) Canceled after 0s
2026-11-10 10:59:15 +08:00
9 changed files with 67 additions and 23 deletions

No files matched your search

+4 -2
View File
@@ -35,7 +35,8 @@ RUN find ./src -type f -name "route.ts" -print0 \
ENV DOCKER_ENV=true
# 海报走站内 /api/image-proxy(浏览器直连豆瓣图被拦导致全裂)
ENV NEXT_PUBLIC_IMAGE_PROXY=/api/image-proxy
ENV NEXT_PUBLIC_SITE_VERSION=fixed106
ENV NEXT_PUBLIC_SITE_VERSION=fixed117
ENV NEXT_PUBLIC_ENABLE_REGISTER=true
# For Docker builds, force dynamic rendering to read runtime environment variables.
RUN sed -i "/const inter = Inter({ subsets: \['latin'] });/a export const dynamic = 'force-dynamic';" src/app/layout.tsx
@@ -55,7 +56,8 @@ ENV HOSTNAME=0.0.0.0
ENV PORT=3000
ENV DOCKER_ENV=true
ENV NEXT_PUBLIC_IMAGE_PROXY=/api/image-proxy
ENV NEXT_PUBLIC_SITE_VERSION=fixed106
ENV NEXT_PUBLIC_SITE_VERSION=fixed117
ENV NEXT_PUBLIC_ENABLE_REGISTER=true
# 从构建器中复制 standalone 输出
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
+15
View File
@@ -10,6 +10,21 @@
"api": "https://hhzyapi.com/api.php/provide/vod",
"name": "彗星资源",
"is_adult": false
},
"bfzy": {
"api": "https://bfzyapi.com/api.php/provide/vod",
"name": "暴风资源",
"is_adult": false
},
"jyzy": {
"api": "https://jyzyapi.com/api.php/provide/vod",
"name": "极速资源",
"is_adult": false
},
"bz360": {
"api": "https://360zy.com/api.php/provide/vod",
"name": "360资源",
"is_adult": false
}
}
}
+11
View File
@@ -152,10 +152,21 @@ async function aggregateAll(sources: SrcCfg[], sp: URLSearchParams) {
return out;
}
// 进程内响应缓存:相同查询 60s 内直接返回,避免每次刷新都重新聚合上游(最新港剧等栏目秒开)
const respCache = new Map<string, [number, any]>();
export async function GET(request: NextRequest) {
const { searchParams } = new URL(request.url);
const cacheKey = searchParams.toString();
const now = Date.now();
const c = respCache.get(cacheKey);
if (c && now - c[0] < 60000) {
return NextResponse.json(c[1], { headers: { 'Access-Control-Allow-Origin': '*', 'Cache-Control': 'public, max-age=60', 'X-Cache': 'HIT' } });
}
const config = await getConfig();
const sourceConfigs: SrcCfg[] = (config.SourceConfig || []).filter((s: any) => !s.disabled);
const r = await aggregateAll(sourceConfigs, searchParams);
respCache.set(cacheKey, [now, r]);
// 防止缓存无限增长:超过 200 条清空
if (respCache.size > 200) respCache.clear();
return NextResponse.json(r, { headers: { 'Access-Control-Allow-Origin': '*', 'Cache-Control': 'public, max-age=60' } });
}
+7 -1
View File
@@ -200,7 +200,7 @@ function FilterClient() {
}
const arr: Item[] = Array.isArray(j?.list) ? j.list : [];
setItems((prev) => {
const base = reset ? [] : [...prev, ...arr];
const base = reset ? [...arr] : [...prev, ...arr];
const seen = new Set<string>();
return base.filter((x) => {
const k = x.title + '|' + x.year;
@@ -231,6 +231,12 @@ function FilterClient() {
load(1, true);
}, [source, cat, area, year]);
// 兜底:首次挂载确保加载一次(避免条件 effect 漏触发)
useEffect(() => {
load(1, true);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
// 分页:上一页/下一页
const goPage = (pg: number) => {
if (pg < 1) return;
+4 -4
View File
@@ -7,13 +7,14 @@ import 'sweetalert2/dist/sweetalert2.min.css';
import { getConfig } from '@/lib/config';
import { SiteProvider } from '../components/SiteProvider';
import Ipv6FirstVisitGate from '../components/Ipv6FirstVisitGate';
import { ThemeProvider } from '../components/ThemeProvider';
const inter = Inter({ subsets: ['latin'] });
// 动态生成 metadata,支持配置更新后的标题变化
export async function generateMetadata(): Promise<Metadata> {
let siteName = process.env.SITE_NAME || 'KatelyaTV';
let siteName = process.env.SITE_NAME || '米视TV';
try {
// 只有在非 d1 和 upstash 存储类型时才尝试获取配置
@@ -57,7 +58,7 @@ export default async function RootLayout({
}: {
children: React.ReactNode;
}) {
let siteName = process.env.SITE_NAME || 'KatelyaTV';
let siteName = process.env.SITE_NAME || '米视TV';
let announcement =
process.env.ANNOUNCEMENT ||
'本网站仅提供影视信息搜索服务,所有内容均来自第三方网站。本站不存储任何视频资源,不对任何内容的准确性、合法性、完整性负责。Link Me TG:@katelya77';
@@ -114,8 +115,7 @@ export default async function RootLayout({
disableTransitionOnChange
>
<SiteProvider siteName={siteName} announcement={announcement}>
{/* 首访不再强制跳 /ipv6(fixed105 移除 Ipv6FirstVisitGate):首页直接加载数据,
IPv6 推荐改由首页 LineRecommender 非阻塞提示 */}
<Ipv6FirstVisitGate />
{children}
</SiteProvider>
</ThemeProvider>
+5 -5
View File
@@ -25,7 +25,7 @@ import PageLayout from '@/components/PageLayout';
import PaginatedRow from '@/components/PaginatedRow';
import VideoCard from '@/components/VideoCard';
// 主内容区大型 KatelyaTV Logo 组件
// 主内容区大型 米视TV Logo 组件
const MainKatelyaLogo = () => {
return (
<div className='main-logo-container'>
@@ -33,7 +33,7 @@ const MainKatelyaLogo = () => {
<div className='logo-background-glow'></div>
{/* 主 Logo */}
<div className='main-katelya-logo'>KatelyaTV</div>
<div className='main-katelya-logo'>米视TV</div>
{/* 副标题 */}
<div className='mt-3 text-center'>
@@ -53,7 +53,7 @@ const MainKatelyaLogo = () => {
);
};
// KatelyaTV 底部 Logo 组件
// 米视TV 底部 Logo 组件
const BottomKatelyaLogo = () => {
return (
<div className='bottom-logo-container'>
@@ -66,9 +66,9 @@ const BottomKatelyaLogo = () => {
</div>
<div className='text-center'>
<div className='bottom-logo'>KatelyaTV</div>
<div className='bottom-logo'>米视TV</div>
<div className='mt-2 text-sm text-gray-500 dark:text-gray-400 opacity-75'>
Powered by KatelyaTV Core
Powered by 米视TV Core
</div>
</div>
</div>
+13 -7
View File
@@ -1,18 +1,24 @@
'use client';
// 首次访问公网入口时跳转到 /ipv6 线路选择页(源码化恢复:旧版 patch_license.js V6-PROBE 在迁移时未搬入源码)
// 首次访问公网入口:若用户支持 IPv6,则跳转到 tv6 线路选择页让用户选择
import { useEffect } from 'react';
export default function Ipv6FirstVisitGate() {
useEffect(() => {
try {
if (location.hostname !== 'tv.88531.cn') return; // 仅公网 IPv4 入口;LAN/IPv6 线路不跳转(避免循环)
if (location.pathname === '/ipv6') return;
// middleware 已记住线路(cookie)即视为已选择,不再重复弹
if (location.hostname !== 'tv.88531.cn') return;
if (/(^|;\s*)__v6dest=/.test(document.cookie)) return;
if (localStorage.getItem('__v6dest')) return; // 已记住线路,不打扰
sessionStorage.setItem('__v6back', location.pathname + location.search + location.hash);
location.replace('/ipv6');
if (localStorage.getItem('__v6dest')) return;
// 探测 IPv6 可达性,可达才跳转
const ctrl = new AbortController();
const t = setTimeout(() => ctrl.abort(), 1500);
fetch('https://tv6.88531.cn:4443/api/license-config?_=', { mode: 'no-cors', signal: ctrl.signal })
.then(() => {
clearTimeout(t);
sessionStorage.setItem('__v6back', location.pathname + location.search + location.hash);
location.replace('https://tv6.88531.cn:4443/ipv6');
})
.catch(() => { clearTimeout(t); });
} catch {}
}, []);
return null;
+4 -4
View File
@@ -205,7 +205,7 @@ async function initConfig() {
}
adminConfig = {
SiteConfig: {
SiteName: process.env.SITE_NAME || 'KatelyaTV',
SiteName: process.env.SITE_NAME || '米视TV',
Announcement:
process.env.ANNOUNCEMENT ||
'本网站仅提供影视信息搜索服务,所有内容均来自第三方网站。本站不存储任何视频资源,不对任何内容的准确性、合法性、完整性负责。',
@@ -245,7 +245,7 @@ async function initConfig() {
// 本地存储直接使用文件配置
cachedConfig = {
SiteConfig: {
SiteName: process.env.SITE_NAME || 'KatelyaTV',
SiteName: process.env.SITE_NAME || '米视TV',
Announcement:
process.env.ANNOUNCEMENT ||
'本网站仅提供影视信息搜索服务,所有内容均来自第三方网站。本站不存储任何视频资源,不对任何内容的准确性、合法性、完整性负责。',
@@ -290,7 +290,7 @@ export async function getConfig(): Promise<AdminConfig> {
if (adminConfig) {
// 合并一些环境变量配置
adminConfig.SiteConfig.SiteName = process.env.SITE_NAME || 'KatelyaTV';
adminConfig.SiteConfig.SiteName = process.env.SITE_NAME || '米视TV';
adminConfig.SiteConfig.Announcement =
process.env.ANNOUNCEMENT ||
'本网站仅提供影视信息搜索服务,所有内容均来自第三方网站。本站不存储任何视频资源,不对任何内容的准确性、合法性、完整性负责。';
@@ -437,7 +437,7 @@ export async function resetConfig() {
}
const adminConfig = {
SiteConfig: {
SiteName: process.env.SITE_NAME || 'KatelyaTV',
SiteName: process.env.SITE_NAME || '米视TV',
Announcement:
process.env.ANNOUNCEMENT ||
'本网站仅提供影视信息搜索服务,所有内容均来自第三方网站。本站不存储任何视频资源,不对任何内容的准确性、合法性、完整性负责。',
+4
View File
@@ -349,6 +349,10 @@ export class RedisStorage implements IStorage {
return match ? ensureString(match[1]) : undefined;
})
.filter((u): u is string => typeof u === 'string');
// 站长(owner)不一定有密码记录,但需显示其最后登录时间
if (!usernames.includes(ownerUsername)) {
usernames.push(ownerUsername);
}
// 获取用户创建时间、最后登录时间并构造 User 对象
const users = await Promise.all(