diff --git a/frontend/src/pages/LibraryScan.jsx b/frontend/src/pages/LibraryScan.jsx index 92a7ec5..78c48ae 100644 --- a/frontend/src/pages/LibraryScan.jsx +++ b/frontend/src/pages/LibraryScan.jsx @@ -1,7 +1,7 @@ import { useEffect, useState } from "react"; import api from "../lib/api"; import { toast } from "sonner"; -import { RefreshCcw, Download, Check, Sparkles } from "lucide-react"; +import { RefreshCcw, Download, Check, Sparkles, CheckSquare, Square } from "lucide-react"; const KINDS = [ { key: "movies", label: "Movies" }, @@ -49,6 +49,11 @@ export default function LibraryScan() { }; const importable = results.filter((r) => !r.already_imported); + const allSelected = importable.length > 0 && importable.every((r) => selected.has(r.storage_path)); + + const toggleSelectAll = () => { + setSelected(allSelected ? new Set() : new Set(importable.map((r) => r.storage_path))); + }; const importSelected = async () => { if (selected.size === 0) return; @@ -105,6 +110,9 @@ export default function LibraryScan() { +