Skip to content

Media Folder Search Improvement - #92

Open
andyvan129 wants to merge 4 commits into
bhj:mainfrom
andyvan129:main
Open

Media Folder Search Improvement#92
andyvan129 wants to merge 4 commits into
bhj:mainfrom
andyvan129:main

Conversation

@andyvan129

Copy link
Copy Markdown

Changed the media folder search logic to only parse new or modified files when re-running a folder search. Greatly improved folder search speed after adding media files.

	modified:   server/Scanner/FileScanner/FileScanner.ts
	modified:   server/Scanner/FileScanner/getFiles.ts
	new file:   server/lib/schemas/006-media-scan-cache.sql
	modified:   src/routes/Player/components/Player/Player.tsx
	modified:   server/lib/IPCBridge.ts
	modified:   server/Scanner/MetaParser/__snapshots__/MetaParser.test.ts.snap
	modified:   server/Scanner/MetaParser/defaultMiddleware.ts
@bhj

bhj commented Jul 3, 2026

Copy link
Copy Markdown
Owner

Hey, thanks for this, I think you're on the right track. A couple thoughts/questions -

  • there's already a dateUpdated column in the media table we can use for mtime (second resolution is probably fine)
  • I wonder if dateUpdated/mtime would be enough to track changes? In other words, do we actually need to track size - can you change the size without altering mtime on any OS?
  • Are you sure we need to track sidecar info? We don't currently, other than just making sure that an audio-only file has a sidecar, but that's about it
  • Please let's keep the unrelated metaparser changes in another PR so this one is scoped to the much-needed scanner improvements

@bhj bhj mentioned this pull request Jul 8, 2026
	modified:   server/Scanner/FileScanner/FileScanner.ts
	modified:   server/Scanner/MetaParser/MetaParser.test.ts
	modified:   server/Scanner/MetaParser/__snapshots__/MetaParser.test.ts.snap
	modified:   server/Scanner/MetaParser/defaultMiddleware.ts
	modified:   server/lib/schemas/006-media-scan-cache.sql
@andyvan129

Copy link
Copy Markdown
Author

Thanks for the comments. Existing media.dateUpdated is now being used. Metadata parser changes reverted for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants