diff options
| author | LogicalPhallacy <44458166+LogicalPhallacy@users.noreply.github.com> | 2019-01-23 00:31:35 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-01-23 00:31:35 -0800 |
| commit | 404bd04cbc17dc8c8bf4a5c9aa3ca9c5cd85aa68 (patch) | |
| tree | 3d267c6ceef9439a034c113095e10e4d619e7c70 /MediaBrowser.Controller/Entities/Year.cs | |
| parent | 8ff89fdc0c30f595a171ffc550f907ef22b6212a (diff) | |
| parent | e05e002b8bb4d13eb2b80b56a0aad8903ddb701e (diff) | |
Merge pull request #8 from jellyfin/master
rebase to latest master
Diffstat (limited to 'MediaBrowser.Controller/Entities/Year.cs')
| -rw-r--r-- | MediaBrowser.Controller/Entities/Year.cs | 36 |
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) { |
