Rank metadata search results and honor filename IDs on tagged files

extractSearchTerms dropped a filename's {tmdb-…} ID whenever the movie was
already tagged (name+release-date+media-kind present), returning a bare title
and ignoring the embedded ID — so a search on a tagged or previously-searched
file came back as a fuzzy title list. That branch now also parses the filename,
so the direct ID lookup fires regardless of prior tagging.

Also rank movie title-search results so exact title matches sort to the top of
the fuzzy provider list, and recover the release year from the filename
(ParseFilename strips it from the title without reporting it) to pick the
default entry: exact+year, then exact, then year-only, then the provider's own
order (a stable sort, so relevance survives within each band). Applied in the
search sheet, the queue metadata action, and both AppleScript commands with
identical ranking so scripted indexes stay aligned; the sheet now highlights
the default pick. Bracketed years win over bare dot/space years so
resolutions like .1920.1080p don't win.

Bump the fork version to 1.9.5mkv2.

Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
Scott GarrettandClaude Code committed 2026-11-29 23:01:43 -05:00
1 parent a153763019
commit 13255140e9
8 files changed
+148 -23

No files matched your search

+1 -1
View File
@@ -41,7 +41,7 @@ final class ChapterSearchController: ViewController, NSTableViewDataSource, NSTa
switch info {
case .movie(let title, _):
case .movie(let title, _, _):
searchTerm = title
case .tvShow, .none:
searchTerm = title