Sessions query param nowPlaying null/false/true now works as expected

This commit is contained in:
Sam Jongenelen 2023-05-04 09:04:08 +02:00
parent 99bcb6f1b8
commit e622e7851c

View file

@ -112,9 +112,11 @@ public class SessionController : BaseJellyfinApiController
}); });
} }
if (nowPlaying.GetValueOrDefault()) if (nowPlaying.HasValue)
{ {
result = result.Where(i => i.NowPlayingItem != null); result = nowPlaying.Value
? result.Where(i => i.NowPlayingItem != null)
: result.Where(i => i.NowPlayingItem == null);
} }
return Ok(result); return Ok(result);