Minor improvements

pull/2916/head
Bond_009 4 years ago
parent b76f570583
commit a73e1f18b6

@ -242,11 +242,11 @@ namespace MediaBrowser.Api.UserLibrary
return folder.GetItems(GetItemsQuery(request, dtoOptions, user));
}
var itemsArray = folder.GetChildren(user, true).ToArray();
var itemsArray = folder.GetChildren(user, true);
return new QueryResult<BaseItem>
{
Items = itemsArray,
TotalRecordCount = itemsArray.Length,
TotalRecordCount = itemsArray.Count,
StartIndex = 0
};
}

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

@ -864,7 +864,7 @@ namespace MediaBrowser.Controller.Entities
return SortItemsByRequest(query, result);
}
return result.ToArray();
return result;
}
return GetItemsInternal(query).Items;

@ -478,7 +478,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
}
catch (Exception ex)
{
_logger.LogError(ex, "I-frame image extraction failed, will attempt standard way. Input: {arguments}", inputArgument);
_logger.LogError(ex, "I-frame image extraction failed, will attempt standard way. Input: {Arguments}", inputArgument);
}
}
@ -969,7 +969,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
public int? ExitCode { get; private set; }
void OnProcessExited(object sender, EventArgs e)
private void OnProcessExited(object sender, EventArgs e)
{
var process = (Process)sender;

Loading…
Cancel
Save