新增私人影视库功能

This commit is contained in:
mtvpls
2025-12-22 00:42:27 +08:00
parent ec042b1231
commit 3c55bc9d1a
24 changed files with 2233 additions and 10 deletions

View File

@@ -635,8 +635,8 @@ const EpisodeSelector: React.FC<EpisodeSelectorProps> = ({
if (!title) {
return episodeNumber;
}
// 如果匹配"第X集"、"第X话"、"X集"、"X话"格式,提取中间的数字
const match = title.match(/(?:第)?(\d+)(?:集|话)/);
// 如果匹配"第X集"、"第X话"、"X集"、"X话"格式,提取中间的数字(支持小数)
const match = title.match(/(?:第)?(\d+(?:\.\d+)?)(?:集|话)/);
if (match) {
return match[1];
}

View File

@@ -2,7 +2,7 @@
'use client';
import { Cat, Clover, Film, Home, Radio, Star, Tv, Users } from 'lucide-react';
import { Cat, Clover, Film, FolderOpen, Home, Radio, Star, Tv, Users } from 'lucide-react';
import Link from 'next/link';
import { usePathname, useSearchParams } from 'next/navigation';
import { useEffect, useState } from 'react';
@@ -90,6 +90,15 @@ const MobileBottomNav = ({ activePath }: MobileBottomNavProps) => {
},
];
// 如果配置了 OpenList添加私人影库入口
if (runtimeConfig?.OPENLIST_ENABLED) {
items.push({
icon: FolderOpen,
label: '私人影库',
href: '/private-library',
});
}
// 如果启用观影室,添加观影室入口
if (watchRoomContext?.isEnabled) {
items.push({

View File

@@ -2,7 +2,7 @@
'use client';
import { Cat, Clover, Film, Home, Menu, Radio, Search, Star, Tv, Users } from 'lucide-react';
import { Cat, Clover, Film, FolderOpen, Home, Menu, Radio, Search, Star, Tv, Users } from 'lucide-react';
import Link from 'next/link';
import { usePathname, useSearchParams } from 'next/navigation';
import {
@@ -179,6 +179,15 @@ const Sidebar = ({ onToggle, activePath = '/' }: SidebarProps) => {
},
];
// 如果配置了 OpenList添加私人影库入口
if (runtimeConfig?.OPENLIST_ENABLED) {
items.push({
icon: FolderOpen,
label: '私人影库',
href: '/private-library',
});
}
// 如果启用观影室,添加观影室入口
if (watchRoomContext?.isEnabled) {
items.push({