diff options
| author | dkanada <dkanada@users.noreply.github.com> | 2020-04-20 13:52:27 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-04-20 13:52:27 +0900 |
| commit | 3142c9b9901cc653eb758ba7d47edbbe2190f83d (patch) | |
| tree | 27df7c515c01c11d2525193e800f3ba02c956914 /MediaBrowser.Controller | |
| parent | 1d4763a2464eaab4ba56be62f226fbd0e4f3f492 (diff) | |
| parent | a73e1f18b670ac7c9f0f9c3049e7fbbeddb61942 (diff) | |
Merge pull request #2916 from Bond-009/minor2
Minor improvements
Diffstat (limited to 'MediaBrowser.Controller')
| -rw-r--r-- | MediaBrowser.Controller/Entities/BaseItem.cs | 5 | ||||
| -rw-r--r-- | MediaBrowser.Controller/Entities/Folder.cs | 2 |
2 files changed, 3 insertions, 4 deletions
diff --git a/MediaBrowser.Controller/Entities/BaseItem.cs b/MediaBrowser.Controller/Entities/BaseItem.cs index 56a361e0e..b9e1fe79d 100644 --- a/MediaBrowser.Controller/Entities/BaseItem.cs +++ b/MediaBrowser.Controller/Entities/BaseItem.cs @@ -2741,7 +2741,7 @@ namespace MediaBrowser.Controller.Entities { var list = GetEtagValues(user); - return string.Join("|", list.ToArray()).GetMD5().ToString("N", CultureInfo.InvariantCulture); + return string.Join("|", list).GetMD5().ToString("N", CultureInfo.InvariantCulture); } protected virtual List<string> GetEtagValues(User user) @@ -2784,8 +2784,7 @@ namespace MediaBrowser.Controller.Entities return true; } - var view = this as IHasCollectionType; - if (view != null) + if (this is IHasCollectionType view) { if (string.Equals(view.CollectionType, CollectionType.LiveTv, StringComparison.OrdinalIgnoreCase)) { diff --git a/MediaBrowser.Controller/Entities/Folder.cs b/MediaBrowser.Controller/Entities/Folder.cs index bb48605e5..a468e0c35 100644 --- a/MediaBrowser.Controller/Entities/Folder.cs +++ b/MediaBrowser.Controller/Entities/Folder.cs @@ -864,7 +864,7 @@ namespace MediaBrowser.Controller.Entities return SortItemsByRequest(query, result); } - return result.ToArray(); + return result; } return GetItemsInternal(query).Items; |
