高级推荐

This commit is contained in:
mtvpls
2026-03-29 11:41:03 +08:00
parent 8acc50b198
commit 7547f78472
7 changed files with 397 additions and 4 deletions
+6
View File
@@ -6,6 +6,7 @@ import { Inter } from 'next/font/google';
import './globals.css';
import { getConfig } from '@/lib/config';
import { listEnabledSourceScripts } from '@/lib/source-script';
import { DanmakuCacheCleanup } from '../components/DanmakuCacheCleanup';
import { DownloadBubble } from '../components/DownloadBubble';
@@ -91,6 +92,7 @@ export default async function RootLayout({
let webLiveEnabled = false;
let customAdFilterVersion = 0;
let tuneHubEnabled = false;
let advancedRecommendationEnabled = false;
let customCategories = [] as {
name: string;
type: 'movie' | 'tv';
@@ -145,6 +147,9 @@ export default async function RootLayout({
customAdFilterVersion = config.SiteConfig?.CustomAdFilterVersion || 0;
// TuneHub音乐功能配置
tuneHubEnabled = config.MusicConfig?.TuneHubEnabled || false;
// 高级推荐功能配置:存在已启用视频源脚本时显示
advancedRecommendationEnabled =
(await listEnabledSourceScripts()).length > 0;
// 检查是否启用了 OpenList 功能
openListEnabled = !!(
config.OpenListConfig?.Enabled &&
@@ -207,6 +212,7 @@ export default async function RootLayout({
AI_DEFAULT_MESSAGE_WITH_VIDEO: aiDefaultMessageWithVideo,
ENABLE_MOVIE_REQUEST: enableMovieRequest,
WEB_LIVE_ENABLED: webLiveEnabled,
ADVANCED_RECOMMENDATION_ENABLED: advancedRecommendationEnabled,
CUSTOM_AD_FILTER_VERSION: customAdFilterVersion,
TUNEHUB_ENABLED: tuneHubEnabled,
FESTIVE_EFFECT_ENABLED: