mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-23 18:46:00 +01:00
Simulate old GetItemValueNames behavior
The GetItemValueNames function in the old implementation was intended to retrieve the original value rather than the cleaned value. The old implementation lacked a clear specification regarding which value to return for the non-cleaned value in a group and relied on an undefined behavior of SQLite, and this implementation assumes the first one is the desired one.
This commit is contained in:
parent
f12acb014a
commit
d2e7ab1c1a
1 changed files with 4 additions and 1 deletions
|
|
@ -854,7 +854,10 @@ public sealed class BaseItemRepository
|
|||
}
|
||||
|
||||
// query = query.DistinctBy(e => e.CleanValue);
|
||||
return query.Select(e => e.ItemValue.CleanValue).ToArray();
|
||||
return query.Select(e => e.ItemValue)
|
||||
.GroupBy(e => e.CleanValue)
|
||||
.Select(e => e.First().Value)
|
||||
.ToArray();
|
||||
}
|
||||
|
||||
private static bool TypeRequiresDeserialization(Type type)
|
||||
|
|
|
|||
Loading…
Reference in a new issue