Prefer null checks over HasValue everywhere
This commit is contained in:
@@ -90,7 +90,7 @@ namespace MediaBrowser.Controller.Entities.Movies
|
||||
{
|
||||
var hasChanges = base.BeforeMetadataRefresh(replaceAllMetadata);
|
||||
|
||||
if (!ProductionYear.HasValue)
|
||||
if (ProductionYear is null)
|
||||
{
|
||||
var info = LibraryManager.ParseName(Name);
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
var hasChanges = base.BeforeMetadataRefresh(replaceAllMetadata);
|
||||
|
||||
if (!ProductionYear.HasValue)
|
||||
if (ProductionYear is null)
|
||||
{
|
||||
var info = LibraryManager.ParseName(Name);
|
||||
|
||||
|
||||
@@ -507,7 +507,7 @@ namespace MediaBrowser.Controller.Entities.TV
|
||||
{
|
||||
var hasChanges = base.BeforeMetadataRefresh(replaceAllMetadata);
|
||||
|
||||
if (!ProductionYear.HasValue)
|
||||
if (ProductionYear is null)
|
||||
{
|
||||
var info = LibraryManager.ParseName(Name);
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
var hasChanges = base.BeforeMetadataRefresh(replaceAllMetadata);
|
||||
|
||||
if (!ProductionYear.HasValue)
|
||||
if (ProductionYear is null)
|
||||
{
|
||||
var info = LibraryManager.ParseName(Name);
|
||||
|
||||
|
||||
@@ -730,7 +730,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
// Apply year filter
|
||||
if (query.Years.Length > 0)
|
||||
{
|
||||
if (!(item.ProductionYear.HasValue && query.Years.Contains(item.ProductionYear.Value)))
|
||||
if (item.ProductionYear is null || !query.Years.Contains(item.ProductionYear.Value))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user