Prefer null checks over HasValue everywhere
This commit is contained in:
@@ -82,7 +82,7 @@ namespace MediaBrowser.XbmcMetadata.Savers
|
||||
writer.WriteElementString("title", album.Name);
|
||||
}
|
||||
|
||||
if (album.ProductionYear.HasValue)
|
||||
if (album.ProductionYear is not null)
|
||||
{
|
||||
writer.WriteElementString("year", album.ProductionYear.Value.ToString(CultureInfo.InvariantCulture));
|
||||
}
|
||||
|
||||
@@ -544,7 +544,7 @@ namespace MediaBrowser.XbmcMetadata.Savers
|
||||
writer.WriteElementString("rating", item.CommunityRating.Value.ToString(CultureInfo.InvariantCulture));
|
||||
}
|
||||
|
||||
if (item.ProductionYear.HasValue)
|
||||
if (item.ProductionYear is not null)
|
||||
{
|
||||
writer.WriteElementString("year", item.ProductionYear.Value.ToString(CultureInfo.InvariantCulture));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user