fix: hide adult libraries across dashboard views

This commit is contained in:
ShukeBta
2026-05-30 03:50:52 +08:00
parent e8c2cf1ea4
commit d35086f49d
8 changed files with 241 additions and 15 deletions
+1 -1
View File
@@ -60,7 +60,7 @@ function LibraryPanel() {
const [path, setPath] = useState('')
const [type, setType] = useState('movie')
const refresh = () => libraryAPI.list().then(setLibs)
const refresh = () => libraryAPI.list({ includeHidden: true }).then(setLibs)
useEffect(() => {
refresh().catch(() => undefined)
}, [])
+1 -1
View File
@@ -249,7 +249,7 @@ export function SettingsPage() {
try {
const [all, libs] = await Promise.all([
adminAPI.listSettings(),
libraryAPI.list().catch(() => [] as Library[]),
libraryAPI.list({ includeHidden: true }).catch(() => [] as Library[]),
])
const idx: Record<string, string> = {}
for (const s of all as Setting[]) {