Use helper function to compare guid (#10825)

This commit is contained in:
Cody Robibero
2024-01-17 08:51:39 -07:00
committed by GitHub
parent 484ccf7f28
commit e7b8d45bbb
58 changed files with 249 additions and 184 deletions

View File

@@ -30,7 +30,7 @@ namespace Emby.Server.Implementations.Library
public QueryResult<SearchHintInfo> GetSearchHints(SearchQuery query)
{
User user = null;
if (!query.UserId.Equals(default))
if (!query.UserId.IsEmpty())
{
user = _userManager.GetUserById(query.UserId);
}
@@ -177,7 +177,7 @@ namespace Emby.Server.Implementations.Library
if (searchQuery.IncludeItemTypes.Length == 1 && searchQuery.IncludeItemTypes[0] == BaseItemKind.MusicArtist)
{
if (!searchQuery.ParentId.Equals(default))
if (!searchQuery.ParentId.IsEmpty())
{
searchQuery.AncestorIds = new[] { searchQuery.ParentId };
searchQuery.ParentId = Guid.Empty;