Merge remote-tracking branch 'origin/main' into feat/audiobooks

# Conflicts:
#	go.sum
This commit is contained in:
RXWatcher
2026-05-27 16:27:25 +02:00
146 changed files with 15999 additions and 1363 deletions
+2 -1
View File
@@ -1207,7 +1207,6 @@ func ptrFloatEqual(a, b *float64) bool {
return *a == *b
}
func nextSharedMarkerAttribution(
existingSource *string,
existingConfidence *float64,
@@ -1438,6 +1437,7 @@ func (r *FileRepository) ClaimUnmatchedMixed(ctx context.Context, limit int) ([]
AND mf.missing_since IS NULL
AND folders.enabled = true
AND lower(trim(folders.type)) NOT IN ('series', 'tv', 'show', 'tvshows', 'movie', 'movies')
AND lower(trim(COALESCE(mf.base_type, ''))) NOT IN ('series', 'movie')
ORDER BY mf.match_attempted_at ASC NULLS FIRST, mf.id ASC
LIMIT $1
FOR UPDATE SKIP LOCKED
@@ -1695,6 +1695,7 @@ func (r *FileRepository) ClaimUnmatchedMixedByFolderAndPathPrefix(
AND mf.missing_since IS NULL
AND folders.enabled = true
AND lower(trim(folders.type)) NOT IN ('series', 'tv', 'show', 'tvshows', 'movie', 'movies')
AND lower(trim(COALESCE(mf.base_type, ''))) NOT IN ('series', 'movie')
AND (mf.file_path = $2 OR mf.file_path LIKE $3 ESCAPE '\')
`)
if !attemptBefore.IsZero() {
+22
View File
@@ -123,6 +123,28 @@ func TestInferGroupAssignments_SeriesSeasonDirsCollapse(t *testing.T) {
}
}
func TestInferGroupAssignments_SeriesEpisodeTitleNumberDoesNotBecomeTVDBID(t *testing.T) {
t.Parallel()
filePaths := []string{
"/sports/television/WWE SmackDown (1999)/Season 01/WWE SmackDown (1999) - S01E01 - SmackDown 01.mkv",
}
rootInference := inferRootAssignments(filePaths, "mixed", 7, nil)
groupInference := inferGroupAssignments(filePaths, "mixed", 7, rootInference.Assignments)
if got, want := len(groupInference.ScannedGroups), 1; got != want {
t.Fatalf("len(ScannedGroups) = %d, want %d", got, want)
}
group := groupInference.ScannedGroups[0]
if got, want := group.InferredType, "series"; got != want {
t.Fatalf("InferredType = %q, want %q", got, want)
}
if group.TvdbID != "" {
t.Fatalf("TvdbID = %q, want empty", group.TvdbID)
}
}
func TestInferGroupAssignments_MovieEpisodeTokenFolderStaysResolved(t *testing.T) {
t.Parallel()