feat: ignore directories with leading underscore in scanner and UI
This commit is contained in:
1 parent
4cd886b696
commit
6ba7159aef
2 files changed
+5
-1
No files matched your search
+4
-1
@@ -53,7 +53,10 @@ async function getInitialMedia() {
|
|||||||
distinct: ['directory'],
|
distinct: ['directory'],
|
||||||
orderBy: { directory: 'asc' }
|
orderBy: { directory: 'asc' }
|
||||||
});
|
});
|
||||||
const directories = dirs.map(d => d.directory).filter(Boolean);
|
const directories = dirs
|
||||||
|
.map(d => d.directory)
|
||||||
|
.filter(Boolean)
|
||||||
|
.filter(d => !d.startsWith('_'));
|
||||||
|
|
||||||
// Serialize BigInt values for client
|
// Serialize BigInt values for client
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -145,6 +145,7 @@ export function isExcludedFile(filename: string): boolean {
|
|||||||
* Check if a directory should be excluded from scanning.
|
* Check if a directory should be excluded from scanning.
|
||||||
*/
|
*/
|
||||||
export function isExcludedDirectory(dirname: string): boolean {
|
export function isExcludedDirectory(dirname: string): boolean {
|
||||||
|
if (dirname.startsWith('_')) return true;
|
||||||
return EXCLUDED_DIRECTORIES.has(dirname.toLowerCase());
|
return EXCLUDED_DIRECTORIES.has(dirname.toLowerCase());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user