Simplify conditional expression

This commit is contained in:
Stepan Goremykin
2023-04-06 19:30:17 +02:00
parent 19e65269a2
commit b6cfdb8b92
3 changed files with 3 additions and 9 deletions

View File

@@ -2749,9 +2749,7 @@ namespace Emby.Server.Implementations.Library
}
})
.Where(i => i is not null)
.Where(i => query.User is null ?
true :
i.IsVisible(query.User))
.Where(i => query.User is null || i.IsVisible(query.User))
.ToList();
}