import { Loader2, RotateCcw, Wrench } from 'lucide-react' import { currentOrigin } from './strmPageModel' import type { useStrmRepairForm } from './useStrmRepairForm' type StrmRepairSectionProps = ReturnType export function StrmRepairSection({ baseURL, outputDir, repairing, refreshLibrary, result, runningMode, onPreview, onRepair, setBaseURL, setOutputDir, setRefreshLibrary, }: StrmRepairSectionProps) { return (

STRM 修复

批量修复已存在 .strm 文件中的本服务播放地址。

setOutputDir(e.target.value)} /> setBaseURL(e.target.value)} />
{result && (
输出目录:{result.output_dir}
{result.previewed ? `预检 ${result.previewed} · ` : ''} 修复 {result.repaired} · 跳过 {result.skipped}
{result.refresh && (
{result.refresh.queued ? `媒体库刷新已排队:${result.refresh.targets?.map((target) => target.name).join('、') || '已匹配媒体库'}` : `媒体库未刷新:${result.refresh.reason || '未匹配到可扫描媒体库'}`}
)} {result.errors && result.errors.length > 0 && (
失败 {result.errors.length} 条:{result.errors.slice(0, 3).join(';')}
)}
)}
) }