diff options
| author | Joshua M. Boniface <joshua@boniface.me> | 2019-02-19 21:24:51 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-02-19 21:24:51 -0500 |
| commit | 89d4ce309dfd63546d032e19bb1c186af7871af6 (patch) | |
| tree | c00a3aef679a7b419e8d2298b7c063dd4d5ec23f /MediaBrowser.Api/UserLibrary/BaseItemsRequest.cs | |
| parent | b43317c5e10aeac5dd1510c3957fa59f453cf2c1 (diff) | |
| parent | 4811e76860c9ad71c14dc8548e70ef001458bf80 (diff) | |
Merge pull request #848 from Bond-009/perf
Minor changes to reduce allocations
Diffstat (limited to 'MediaBrowser.Api/UserLibrary/BaseItemsRequest.cs')
| -rw-r--r-- | MediaBrowser.Api/UserLibrary/BaseItemsRequest.cs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/MediaBrowser.Api/UserLibrary/BaseItemsRequest.cs b/MediaBrowser.Api/UserLibrary/BaseItemsRequest.cs index 7af50c329..a26f59573 100644 --- a/MediaBrowser.Api/UserLibrary/BaseItemsRequest.cs +++ b/MediaBrowser.Api/UserLibrary/BaseItemsRequest.cs @@ -396,14 +396,12 @@ namespace MediaBrowser.Api.UserLibrary public VideoType[] GetVideoTypes() { - var val = VideoTypes; - - if (string.IsNullOrEmpty(val)) + if (string.IsNullOrEmpty(VideoTypes)) { - return new VideoType[] { }; + return Array.Empty<VideoType>(); } - return val.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries).Select(v => (VideoType)Enum.Parse(typeof(VideoType), v, true)).ToArray(); + return VideoTypes.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries).Select(v => (VideoType)Enum.Parse(typeof(VideoType), v, true)).ToArray(); } /// <summary> |
