From 49ba116783f94ac266f4bbce5053919d08d46fce Mon Sep 17 00:00:00 2001 From: matt1432 <matt@nelim.org> Date: Thu, 27 Mar 2025 19:34:38 -0400 Subject: [PATCH] feat(l2s): hardlink instead of copy files --- apps/list2series/src/app.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/list2series/src/app.ts b/apps/list2series/src/app.ts index 25362438..f994611a 100644 --- a/apps/list2series/src/app.ts +++ b/apps/list2series/src/app.ts @@ -1,5 +1,5 @@ import axios from 'axios'; -import { copyFileSync, mkdirSync, readFileSync, rmSync } from 'fs'; +import { linkSync, mkdirSync, readFileSync, rmSync } from 'fs'; import { basename } from 'path'; // eslint-disable-next-line @@ -178,8 +178,8 @@ const main = async() => { const bookPath = book.url; const inListPath = `${seriesPath}/${basename(bookPath)}`; - console.log(`copying ${basename(bookPath)}`); - copyFileSync(bookPath, inListPath); + console.log(`hardlinking ${basename(bookPath)}`); + linkSync(bookPath, inListPath); } await scanLibrary();