Try to limit the random artworks returned by the AppleTV provider

This commit is contained in:
Damiano Galassi committed 2024-07-20 07:58:51 +02:00
1 parent 59a715f6d6
commit 64f7ba85a7
3 files changed
+40 -39

No files matched your search

+1 -1
View File
@@ -238,7 +238,7 @@ public struct AppleTV: MetadataService {
if let result = items?.filter({ $0.title == normalizedTerm }).first {
return result
} else if let result = items?.first {
} else if let result = items?.filter({ $0.title?.minimumEditDistance(other: normalizedTerm) ?? Int.max < 8 }).first {
return result
} else {
return nil