Fix some warnings and only disable TreatWarningsAsErrors for CodeAnalysis (#8709)

This commit is contained in:
Bond-009
2022-12-05 13:54:28 +01:00
committed by GitHub
parent bf3ff15843
commit 210a4921f2
18 changed files with 29 additions and 31 deletions

View File

@@ -49,7 +49,7 @@
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<CodeAnalysisTreatWarningsAsErrors>false</CodeAnalysisTreatWarningsAsErrors>
</PropertyGroup>
<!-- Code Analyzers-->

View File

@@ -243,7 +243,7 @@ namespace Emby.Server.Implementations.LiveTv.Listings
{
Id = c.Id,
Name = c.DisplayName,
ImageUrl = c.Icon != null && !string.IsNullOrEmpty(c.Icon.Source) ? c.Icon.Source : null,
ImageUrl = string.IsNullOrEmpty(c.Icon.Source) ? null : c.Icon.Source,
Number = string.IsNullOrWhiteSpace(c.Number) ? c.Id : c.Number
}).ToList();
}