Skip to content

Commit

Permalink
Merge pull request jellyfin#2916 from Bond-009/minor2
Browse files Browse the repository at this point in the history
Minor improvements
  • Loading branch information
dkanada authored Apr 20, 2020
2 parents 1d4763a + a73e1f1 commit 3142c9b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
4 changes: 2 additions & 2 deletions MediaBrowser.Api/UserLibrary/ItemsService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -242,11 +242,11 @@ private QueryResult<BaseItem> GetQueryResult(GetItems request, DtoOptions dtoOpt
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
};
}
Expand Down
5 changes: 2 additions & 3 deletions MediaBrowser.Controller/Entities/BaseItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2741,7 +2741,7 @@ public string GetEtag(User user)
{
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)
Expand Down Expand Up @@ -2784,8 +2784,7 @@ public virtual bool IsTopParent
return true;
}

var view = this as IHasCollectionType;
if (view != null)
if (this is IHasCollectionType view)
{
if (string.Equals(view.CollectionType, CollectionType.LiveTv, StringComparison.OrdinalIgnoreCase))
{
Expand Down
2 changes: 1 addition & 1 deletion MediaBrowser.Controller/Entities/Folder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -864,7 +864,7 @@ public IReadOnlyList<BaseItem> GetItemList(InternalItemsQuery query)
return SortItemsByRequest(query, result);
}

return result.ToArray();
return result;
}

return GetItemsInternal(query).Items;
Expand Down
4 changes: 2 additions & 2 deletions MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ private async Task<string> ExtractImage(string[] inputFiles, string container, M
}
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);
}
}

Expand Down Expand Up @@ -969,7 +969,7 @@ public ProcessWrapper(Process process, MediaEncoder mediaEncoder)

public int? ExitCode { get; private set; }

void OnProcessExited(object sender, EventArgs e)
private void OnProcessExited(object sender, EventArgs e)
{
var process = (Process)sender;

Expand Down

0 comments on commit 3142c9b

Please sign in to comment.