aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Entities/Year.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Controller/Entities/Year.cs')
-rw-r--r--MediaBrowser.Controller/Entities/Year.cs36
1 files changed, 7 insertions, 29 deletions
diff --git a/MediaBrowser.Controller/Entities/Year.cs b/MediaBrowser.Controller/Entities/Year.cs
index 8e3cd0b70..13e82fada 100644
--- a/MediaBrowser.Controller/Entities/Year.cs
+++ b/MediaBrowser.Controller/Entities/Year.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
using System.Collections.Generic;
using System.Globalization;
using MediaBrowser.Model.Serialization;
@@ -25,13 +25,7 @@ namespace MediaBrowser.Controller.Entities
/// </summary>
/// <value>The containing folder path.</value>
[IgnoreDataMember]
- public override string ContainingFolderPath
- {
- get
- {
- return Path;
- }
- }
+ public override string ContainingFolderPath => Path;
public override double GetDefaultPrimaryImageAspectRatio()
{
@@ -42,13 +36,7 @@ namespace MediaBrowser.Controller.Entities
}
[IgnoreDataMember]
- public override bool SupportsAncestors
- {
- get
- {
- return false;
- }
- }
+ public override bool SupportsAncestors => false;
public override bool CanDelete()
{
@@ -62,11 +50,9 @@ namespace MediaBrowser.Controller.Entities
public IList<BaseItem> GetTaggedItems(InternalItemsQuery query)
{
- int year;
-
var usCulture = new CultureInfo("en-US");
- if (!int.TryParse(Name, NumberStyles.Integer, usCulture, out year))
+ if (!int.TryParse(Name, NumberStyles.Integer, usCulture, out var year))
{
return new List<BaseItem>();
}
@@ -78,24 +64,16 @@ namespace MediaBrowser.Controller.Entities
public int? GetYearValue()
{
- int i;
-
- if (int.TryParse(Name, NumberStyles.Integer, CultureInfo.InvariantCulture, out i))
+ if (int.TryParse(Name, NumberStyles.Integer, CultureInfo.InvariantCulture, out var year))
{
- return i;
+ return year;
}
return null;
}
[IgnoreDataMember]
- public override bool SupportsPeople
- {
- get
- {
- return false;
- }
- }
+ public override bool SupportsPeople => false;
public static string GetPath(string name)
{