[{"data":1,"prerenderedAt":658},["ShallowReactive",2],{"navigation_docs":3,"trending-repo-LibreSpark\u002FLibreTV":249,"page-views-\u002Ftrending\u002FLibreSpark\u002FLibreTV":656},[4,29,104,124,194],{"title":5,"icon":6,"path":7,"stem":8,"children":9},"Start",false,"\u002Fstart","1.start",[10,14,19,24],{"title":11,"path":7,"stem":12,"icon":13},"What jscpd finds","1.start\u002Findex","i-lucide-house",{"title":15,"path":16,"stem":17,"icon":18},"Installation","\u002Fstart\u002Finstallation","1.start\u002F2.installation","i-lucide-download",{"title":20,"path":21,"stem":22,"icon":23},"Quickstart","\u002Fstart\u002Fquickstart","1.start\u002F3.quickstart","i-lucide-rocket",{"title":25,"path":26,"stem":27,"icon":28},"Configuration basics","\u002Fstart\u002Fconfiguration","1.start\u002F4.configuration","i-lucide-settings-2",{"title":30,"icon":6,"path":31,"stem":32,"children":33,"page":6},"Guides","\u002Fguides","2.guides",[34,39,44,49,54,59,64,69,74,79,84,89,94,99],{"title":35,"path":36,"stem":37,"icon":38},"Use jscpd in CI","\u002Fguides\u002Fci","2.guides\u002F01.ci","i-lucide-github",{"title":40,"path":41,"stem":42,"icon":43},"Pre-commit hooks","\u002Fguides\u002Fpre-commit","2.guides\u002F02.pre-commit","i-lucide-git-commit",{"title":45,"path":46,"stem":47,"icon":48},"Fail only on new duplication","\u002Fguides\u002Fbaseline","2.guides\u002F03.baseline","i-lucide-git-compare",{"title":50,"path":51,"stem":52,"icon":53},"Monorepos","\u002Fguides\u002Fmonorepos","2.guides\u002F04.monorepos","i-lucide-folder-tree",{"title":55,"path":56,"stem":57,"icon":58},"Cross-format detection","\u002Fguides\u002Fcross-format","2.guides\u002F05.cross-format","i-lucide-layers",{"title":60,"path":61,"stem":62,"icon":63},"Agents","\u002Fguides\u002Fagents","2.guides\u002F06.agents","i-lucide-cpu",{"title":65,"path":66,"stem":67,"icon":68},"Editors","\u002Fguides\u002Feditors","2.guides\u002F07.editors","i-lucide-code",{"title":70,"path":71,"stem":72,"icon":73},"Duplication over git history","\u002Fguides\u002Fhistory","2.guides\u002F08.history","i-lucide-chart-no-axes-combined",{"title":75,"path":76,"stem":77,"icon":78},"Dashboard and health score","\u002Fguides\u002Fdashboard","2.guides\u002F09.dashboard","i-lucide-layout-dashboard",{"title":80,"path":81,"stem":82,"icon":83},"Dead code","\u002Fguides\u002Fdead-code","2.guides\u002F10.dead-code","i-lucide-ghost",{"title":85,"path":86,"stem":87,"icon":88},"Comparing two codebases","\u002Fguides\u002Fcompare","2.guides\u002F11.compare","i-lucide-git-compare-arrows",{"title":90,"path":91,"stem":92,"icon":93},"Semantic clones","\u002Fguides\u002Fsemantic-clones","2.guides\u002F12.semantic-clones","i-lucide-brain-circuit",{"title":95,"path":96,"stem":97,"icon":98},"Similar functions","\u002Fguides\u002Fsimilarity","2.guides\u002F13.similarity","i-lucide-list-tree",{"title":100,"path":101,"stem":102,"icon":103},"Boundaries","\u002Fguides\u002Fboundaries","2.guides\u002F14.boundaries","i-lucide-fence",{"title":105,"icon":6,"path":106,"stem":107,"children":108,"page":6},"Concepts","\u002Fconcepts","3.concepts",[109,114,119],{"title":110,"path":111,"stem":112,"icon":113},"Types of code clones","\u002Fconcepts\u002Fclone-types","3.concepts\u002F1.clone-types","i-lucide-copy",{"title":115,"path":116,"stem":117,"icon":118},"How detection works","\u002Fconcepts\u002Fhow-detection-works","3.concepts\u002F2.how-detection-works","i-lucide-scan-search",{"title":120,"path":121,"stem":122,"icon":123},"The health score","\u002Fconcepts\u002Fhealth-score","3.concepts\u002F3.health-score","i-lucide-heart-pulse",{"title":125,"icon":6,"path":126,"stem":127,"children":128,"page":6},"Reference","\u002Freference","4.reference",[129,134,139,144,181,186,190],{"title":130,"path":131,"stem":132,"icon":133},"CLI options","\u002Freference\u002Fcli","4.reference\u002F1.cli","i-lucide-terminal",{"title":135,"path":136,"stem":137,"icon":138},"The config file","\u002Freference\u002Fconfig-file","4.reference\u002F2.config-file","i-lucide-settings",{"title":140,"path":141,"stem":142,"icon":143},"Exit codes","\u002Freference\u002Fexit-codes","4.reference\u002F3.exit-codes","i-lucide-log-out",{"title":145,"icon":6,"path":146,"stem":147,"children":148},"Reporters","\u002Freference\u002Freporters","4.reference\u002F4.reporters\u002Findex",[149,151,156,161,166,171,176],{"title":145,"path":146,"stem":147,"icon":150},"i-lucide-file-chart-column",{"title":152,"path":153,"stem":154,"icon":155},"HTML reporter","\u002Freference\u002Freporters\u002Fhtml","4.reference\u002F4.reporters\u002F2.html","i-lucide-file-code",{"title":157,"path":158,"stem":159,"icon":160},"JSON reporter","\u002Freference\u002Freporters\u002Fjson","4.reference\u002F4.reporters\u002F3.json","i-lucide-braces",{"title":162,"path":163,"stem":164,"icon":165},"Badge reporter","\u002Freference\u002Freporters\u002Fbadge","4.reference\u002F4.reporters\u002F4.badge","i-lucide-award",{"title":167,"path":168,"stem":169,"icon":170},"SARIF reporter","\u002Freference\u002Freporters\u002Fsarif","4.reference\u002F4.reporters\u002F5.sarif","i-lucide-shield-check",{"title":172,"path":173,"stem":174,"icon":175},"CodeClimate reporter","\u002Freference\u002Freporters\u002Fcodeclimate","4.reference\u002F4.reporters\u002F6.codeclimate","i-lucide-flag-triangle-right",{"title":177,"path":178,"stem":179,"icon":180},"OpenMetrics reporter","\u002Freference\u002Freporters\u002Fopenmetrics","4.reference\u002F4.reporters\u002F7.openmetrics","i-lucide-activity",{"title":182,"path":183,"stem":184,"icon":185},"Supported formats","\u002Freference\u002Fsupported-formats","4.reference\u002F5.supported-formats","i-lucide-languages",{"title":187,"path":188,"stem":189,"icon":38},"GitHub Action","\u002Freference\u002Fgithub-action","4.reference\u002F6.github-action",{"title":191,"path":192,"stem":193,"icon":68},"Rust crates","\u002Freference\u002Frust-crates","4.reference\u002F7.rust-crates",{"title":195,"icon":6,"path":196,"stem":197,"children":198,"page":6},"Project","\u002Fproject","5.project",[199,204,209,214,239,244],{"title":200,"path":201,"stem":202,"icon":203},"Changelog","\u002Fproject\u002Fchangelog","5.project\u002F1.changelog","i-lucide-scroll-text",{"title":205,"path":206,"stem":207,"icon":208},"Migrating from v4 to v5","\u002Fproject\u002Fmigration","5.project\u002F2.migration","i-lucide-arrow-right-left",{"title":210,"path":211,"stem":212,"icon":213},"jscpd v4 (TypeScript)","\u002Fproject\u002Fv4","5.project\u002F3.v4","i-simple-icons-typescript",{"title":215,"icon":6,"path":216,"stem":217,"children":218},"Benchmarks","\u002Fproject\u002Fbenchmarks","5.project\u002F4.benchmarks\u002Findex",[219,221,226,230,235],{"title":215,"path":216,"stem":217,"icon":220},"i-lucide-gauge",{"title":222,"path":223,"stem":224,"icon":225},"Detection Speed","\u002Fproject\u002Fbenchmarks\u002Fdetection-speed","5.project\u002F4.benchmarks\u002F2.detection-speed","i-lucide-zap",{"title":227,"path":228,"stem":229,"icon":58},"Multi-Format Detection","\u002Fproject\u002Fbenchmarks\u002Fcross-format","5.project\u002F4.benchmarks\u002F3.cross-format",{"title":231,"path":232,"stem":233,"icon":234},"AI Token Efficiency","\u002Fproject\u002Fbenchmarks\u002Fai-token-efficiency","5.project\u002F4.benchmarks\u002F4.ai-token-efficiency","i-lucide-sparkles",{"title":236,"path":237,"stem":238,"icon":93},"Embedding Models","\u002Fproject\u002Fbenchmarks\u002Fembedding-models","5.project\u002F4.benchmarks\u002F5.embedding-models",{"title":240,"path":241,"stem":242,"icon":243},"Research","\u002Fproject\u002Fresearch","5.project\u002F5.research","i-lucide-graduation-cap",{"title":245,"path":246,"stem":247,"icon":248},"Articles","\u002Fproject\u002Farticles","5.project\u002F6.articles","i-lucide-newspaper",{"name":250,"url":251,"appearances":252,"latest":268},"LibreSpark\u002FLibreTV","https:\u002F\u002Fgithub.com\u002FLibreSpark\u002FLibreTV",[253],{"date":254,"rank":255,"stars":256,"starsToday":257,"headSha":258,"sources":259,"lines":260,"clones":261,"duplicatedLines":262,"percentage":263,"codePercentage":264,"codeSources":265,"healthScore":266,"healthGrade":267},"2026-10-16",4,18227,978,"a24ad336a3f7c8a16ca93d1f1198e08ac6b7e943",141,22245,24,227,1.02,0.93,105,75.9,"B",{"date":254,"generatedAt":269,"name":250,"url":251,"description":270,"language":271,"stars":256,"starsToday":257,"defaultBranch":272,"headSha":258,"durationMs":273,"total":274,"formats":278,"topClones":323,"code":467,"health":552,"complexity":585,"deadCode":633},"2026-10-16T05:28:44.455Z","一分钟搭建影视站，支持Docker等部署方式","TypeScript","main",1025,{"sources":259,"lines":260,"tokens":275,"clones":261,"duplicatedLines":262,"duplicatedTokens":276,"percentage":263,"percentageTokens":277},139512,1613,1.16,[279,286,293,299,305,310,313,316,320],{"format":280,"sources":281,"lines":282,"clones":283,"duplicatedLines":284,"percentage":285},"typescript",89,12122,12,103,0.85,{"format":287,"sources":288,"lines":289,"clones":290,"duplicatedLines":291,"percentage":292},"tsx",33,8410,8,90,1.07,{"format":294,"sources":295,"lines":296,"clones":295,"duplicatedLines":297,"percentage":298},"yaml",3,345,28,8.12,{"format":300,"sources":301,"lines":302,"clones":301,"duplicatedLines":303,"percentage":304},"css",1,156,6,3.85,{"format":306,"sources":307,"lines":308,"clones":309,"duplicatedLines":309,"percentage":309},"bash",10,710,0,{"format":311,"sources":301,"lines":312,"clones":309,"duplicatedLines":309,"percentage":309},"markdown",246,{"format":314,"sources":301,"lines":315,"clones":309,"duplicatedLines":309,"percentage":309},"perl",168,{"format":317,"sources":318,"lines":319,"clones":309,"duplicatedLines":309,"percentage":309},"json",2,62,{"format":321,"sources":301,"lines":322,"clones":309,"duplicatedLines":309,"percentage":309},"javascript",26,[324,355,377,402,412,425,436,444,449,460],{"format":280,"lines":325,"tokens":326,"first":327,"others":331,"copies":295,"excerpt":338,"excerptSecond":350,"kind":354},15,78,{"name":328,"start":329,"end":330},"src\u002Flib\u002Fm3u8.ts",85,99,[332,335],{"name":328,"start":333,"end":334},169,178,{"name":328,"start":336,"end":337},257,266,{"lines":339,"total":325},[340,341,342,343,344,345,346,347,348,349],"export function stripLeadAdGroup(m3u8Content: string): string {","  if (!m3u8Content) return '';","  const lines = m3u8Content.split('\\n');","  const isDisc = (l: string) => l.trim() === '#EXT-X-DISCONTINUITY';","  const isSegment = (l: string) => {","    const t = l.trim();","    return t !== '' && !t.startsWith('#');","  };","","  \u002F\u002F 多分组封装（采集站把流按固定块切分、每个衔接处都打 DISCONTINUITY）不是广告。",{"lines":351,"total":307},[352,341,342,343,344,345,346,347,348,353],"function stripMarkedAdGroups(m3u8Content: string): string {","  const drop = new Array\u003Cboolean>(lines.length).fill(false);","code",{"format":287,"lines":356,"tokens":357,"first":358,"others":362,"copies":318,"excerpt":366,"kind":354},19,110,{"name":359,"start":360,"end":361},"src\u002Fcomponents\u002Fdouban-section.tsx",120,138,[363],{"name":359,"start":364,"end":365},165,183,{"lines":367,"total":356},[368,369,370,371,348,372,373,374,375,376],"      {name}","    \u003C\u002FChipButton>","  ))}","\u003C\u002Fdiv>","{query.isError ? (","  \u003Cp className=\"text-center text-sm text-faint py-8\">推荐内容加载失败，可稍后重试或在设置中关闭\u003C\u002Fp>",") : query.isLoading ? (","  \u003CGridSkeleton \u002F>",") : (",{"format":280,"lines":307,"tokens":378,"first":379,"others":383,"copies":318,"excerpt":387,"excerptSecond":399,"kind":354},107,{"name":380,"start":381,"end":382},"src\u002Flib\u002Fm3u8-downloader.ts",231,240,[384],{"name":380,"start":385,"end":386},244,253,{"lines":388,"total":307},[389,390,391,392,393,394,395,396,397,398],"for (let i = 1; i \u003C= total; i++) {","  if (signal.aborted) return;","  await pause.waitIfPaused();","  const resp = await cache.match(new Request(chunkKey(i)));","  if (!resp) throw new Error(`分片 ${i} 缓存丢失，请重试`);","  let data = await resp.arrayBuffer();","  if (aesKey && parsed.aesConf) {","    data = await decryptSegment(data, aesKey, parsed.aesConf.iv, parsed.mediaSequence, i - 1);","  }","  await transmuxer.pushAndTransmux(new Uint8Array(data));",{"lines":400,"total":307},[389,390,391,392,393,394,395,396,397,401],"  await target.write(new Uint8Array(data));",{"format":300,"lines":303,"tokens":284,"first":403,"others":407,"copies":318,"kind":411},{"name":404,"start":405,"end":406},"src\u002Fapp\u002Fglobals.css",30,35,[408],{"name":404,"start":409,"end":410},61,66,"styles",{"format":280,"lines":303,"tokens":413,"first":414,"others":418,"copies":295,"kind":354},51,{"name":415,"start":416,"end":417},"src\u002Flib\u002Fenv-live-sources.ts",9,14,[419,421],{"name":420,"start":416,"end":417},"src\u002Flib\u002Fenv-sources.ts",{"name":422,"start":423,"end":424},"src\u002Flib\u002Fenv-subscriptions.ts",13,18,{"format":287,"lines":417,"tokens":426,"first":427,"others":431,"copies":318,"kind":354},81,{"name":428,"start":429,"end":430},"src\u002Fcomponents\u002Flive-source-manager.tsx",159,172,[432],{"name":433,"start":434,"end":435},"src\u002Fcomponents\u002Fsource-manager.tsx",321,334,{"format":280,"lines":416,"tokens":437,"first":438,"others":440,"copies":318,"kind":443},77,{"name":439,"start":301,"end":416},"src\u002Flib\u002Fstore.test.ts",[441],{"name":442,"start":301,"end":416},"src\u002Flib\u002Fsubscription-sync.test.ts","tests",{"format":280,"lines":416,"tokens":445,"first":446,"others":447,"copies":318,"kind":354},74,{"name":415,"start":424,"end":322},[448],{"name":420,"start":424,"end":322},{"format":294,"lines":450,"tokens":451,"first":452,"others":455,"copies":318,"kind":459},11,68,{"name":453,"start":454,"end":437},".github\u002Fworkflows\u002Fdocker-publish.yml",67,[456],{"name":453,"start":457,"end":458},129,139,"data",{"format":287,"lines":450,"tokens":451,"first":461,"others":464,"copies":318,"kind":354},{"name":359,"start":462,"end":463},84,94,[465],{"name":359,"start":466,"end":361},128,{"sources":265,"lines":468,"tokens":469,"clones":470,"duplicatedLines":471,"duplicatedTokens":472,"percentage":264,"percentageTokens":292,"formats":473,"topClones":483,"generated":550},17617,102118,16,163,1097,[474,475,479,481,482],{"format":287,"sources":288,"lines":289,"clones":290,"duplicatedLines":291,"percentage":292},{"format":280,"sources":409,"lines":476,"clones":290,"duplicatedLines":477,"percentage":478},8319,73,0.88,{"format":306,"sources":416,"lines":480,"clones":309,"duplicatedLines":309,"percentage":309},694,{"format":314,"sources":301,"lines":315,"clones":309,"duplicatedLines":309,"percentage":309},{"format":321,"sources":301,"lines":322,"clones":309,"duplicatedLines":309,"percentage":309},[484,493,499,507,512,516,520,524,532,540],{"format":280,"lines":325,"tokens":326,"first":485,"others":486,"copies":295,"excerpt":489,"excerptSecond":491,"kind":354},{"name":328,"start":329,"end":330},[487,488],{"name":328,"start":333,"end":334},{"name":328,"start":336,"end":337},{"lines":490,"total":325},[340,341,342,343,344,345,346,347,348,349],{"lines":492,"total":307},[352,341,342,343,344,345,346,347,348,353],{"format":287,"lines":356,"tokens":357,"first":494,"others":495,"copies":318,"excerpt":497,"kind":354},{"name":359,"start":360,"end":361},[496],{"name":359,"start":364,"end":365},{"lines":498,"total":356},[368,369,370,371,348,372,373,374,375,376],{"format":280,"lines":307,"tokens":378,"first":500,"others":501,"copies":318,"excerpt":503,"excerptSecond":505,"kind":354},{"name":380,"start":381,"end":382},[502],{"name":380,"start":385,"end":386},{"lines":504,"total":307},[389,390,391,392,393,394,395,396,397,398],{"lines":506,"total":307},[389,390,391,392,393,394,395,396,397,401],{"format":280,"lines":303,"tokens":413,"first":508,"others":509,"copies":295,"kind":354},{"name":415,"start":416,"end":417},[510,511],{"name":420,"start":416,"end":417},{"name":422,"start":423,"end":424},{"format":287,"lines":417,"tokens":426,"first":513,"others":514,"copies":318,"kind":354},{"name":428,"start":429,"end":430},[515],{"name":433,"start":434,"end":435},{"format":280,"lines":416,"tokens":445,"first":517,"others":518,"copies":318,"kind":354},{"name":415,"start":424,"end":322},[519],{"name":420,"start":424,"end":322},{"format":287,"lines":450,"tokens":451,"first":521,"others":522,"copies":318,"kind":354},{"name":359,"start":462,"end":463},[523],{"name":359,"start":466,"end":361},{"format":287,"lines":303,"tokens":454,"first":525,"others":528,"copies":318,"kind":354},{"name":433,"start":526,"end":527},801,806,[529],{"name":433,"start":530,"end":531},847,852,{"format":287,"lines":533,"tokens":409,"first":534,"others":536,"copies":318,"kind":354},7,{"name":428,"start":535,"end":322},20,[537],{"name":433,"start":538,"end":539},213,219,{"format":287,"lines":307,"tokens":541,"first":542,"others":545,"copies":318,"kind":354},60,{"name":543,"start":544,"end":302},"src\u002Fcomponents\u002Fdetail-modal.tsx",147,[546],{"name":547,"start":548,"end":549},"src\u002Fcomponents\u002Fswitch-source.tsx",194,201,{"files":309,"minified":309,"sample":551},[],{"score":266,"grade":267,"size":553,"dimensions":557},{"lines":554,"files":555,"class":556},21420,133,"M",[558,570,578],{"id":559,"source":560,"value":561,"adjusted":562,"lines":563,"halfLife":564,"formats":565,"excluded":566,"weight":301,"score":569},"duplication","jscpd",0.9,1.1,193,8.5,[280,287,306,314,321],[567,568,459],"markup","text",91.2,{"id":571,"source":560,"value":572,"adjusted":573,"lines":288,"halfLife":574,"coverage":575,"weight":576,"score":577},"dead-code",0.2,0.4,7.5,96,0.96,96.2,{"id":579,"source":560,"value":580,"adjusted":581,"lines":582,"halfLife":583,"weight":301,"score":584},"complexity",52.1,49.4,11152,50,50.4,{"total":586,"mean":587,"files":588},4534,34.1,[589,593,598,602,606,611,616,621,624,628],{"path":433,"complexity":590,"lines":591,"bytes":592},290,1271,48663,{"path":594,"complexity":595,"lines":596,"bytes":597},"src\u002Flib\u002Fstore.ts",239,872,38654,{"path":599,"complexity":302,"lines":600,"bytes":601},"src\u002Fcomponents\u002Flive-channel-list.tsx",594,23898,{"path":603,"complexity":360,"lines":604,"bytes":605},"src\u002Fcomponents\u002Fplayer-shell.tsx",528,22460,{"path":607,"complexity":608,"lines":609,"bytes":610},"src\u002Fapp\u002Fapi\u002Flive\u002Fprobe\u002Froute.ts",119,591,22088,{"path":612,"complexity":613,"lines":614,"bytes":615},"src\u002Flib\u002Ftvbox-parser.ts",114,397,13861,{"path":617,"complexity":618,"lines":619,"bytes":620},"src\u002Fapp\u002Flive\u002Fpage.tsx",113,468,20612,{"path":328,"complexity":357,"lines":622,"bytes":623},309,13216,{"path":625,"complexity":265,"lines":626,"bytes":627},"src\u002Fapp\u002Fwatch\u002Fpage.tsx",402,15321,{"path":629,"complexity":630,"lines":631,"bytes":632},"src\u002Fcomponents\u002Flive-player.tsx",100,430,16328,{"percentage":634,"findings":255,"files":635,"byCategory":636,"largest":639},0.16,124,[637],{"category":638,"count":255},"unused-export",[640,644,647,651],{"category":638,"path":641,"name":642,"line":643,"lines":450},"src\u002Flib\u002Fvideo-cache.ts","hasCachedSegment",98,{"category":638,"path":641,"name":645,"line":646,"lines":450},"deleteEpisodeCache",262,{"category":638,"path":648,"name":649,"line":650,"lines":303},"src\u002Flib\u002Ffetch-utils.ts","fetchUpstreamJson",116,{"category":638,"path":652,"name":653,"line":654,"lines":655},"src\u002Flib\u002Fclient-api.ts","SearchFailure",267,5,{"\u002Ftrending\u002FLibreSpark\u002FLibreTV":657},{"views":303,"visits":303},1795510259872]