Some Lists -> IEnumerable

This commit is contained in:
Bond_009
2019-02-09 01:09:22 +01:00
committed by Bond-009
parent 3e6819c718
commit 7722cb3ffa
2 changed files with 9 additions and 11 deletions

View File

@@ -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>