<feed xmlns='http://www.w3.org/2005/Atom'>
<title>jellyfin/tests/Jellyfin.Server.Implementations.Tests/Item/BaseItemRepositoryPlayedOrderingTests.cs, branch master</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<id>https://git.lodewillems.com/jellyfin/atom?h=master</id>
<link rel='self' href='https://git.lodewillems.com/jellyfin/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.lodewillems.com/jellyfin/'/>
<updated>2026-08-25T13:19:38Z</updated>
<entry>
<title>Order IsPlayed and IsUnplayed by the played state the filter reports</title>
<updated>2026-08-25T13:19:38Z</updated>
<author>
<name>Piotr Niełacny</name>
<email>piotr.nielacny@gmail.com</email>
</author>
<published>2026-08-25T13:19:38Z</published>
<link rel='alternate' type='text/html' href='https://git.lodewillems.com/jellyfin/commit/?id=5e621d0e3f2102177210f162e72a5d73378063fb'/>
<id>urn:sha1:5e621d0e3f2102177210f162e72a5d73378063fb</id>
<content type='text'>
Ordering mapped both keys to the item's own stored UserData row. Folders do not
have one: a series, season or box set counts as played when no descendant is
left unplayed, which is what the isPlayed filter and the DTO both report. A
mixed library therefore sorted every series and box set into the unplayed group,
and a query could filter and sort by two different notions of "played".

Extract the filter's predicate into BuildIsPlayedFilter and route both sort keys
through it so the two cannot drift apart again.
</content>
</entry>
</feed>
