Skip to content

Commit

Permalink
misc: supposedly increase performance
Browse files Browse the repository at this point in the history
by droping the use of abstract interfaces, according to dotnet8.
  • Loading branch information
revam committed May 12, 2024
1 parent d676c8c commit 32324c8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Shokofin/Collections/CollectionManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ private async Task CleanupGroupCollections()
await RemoveCollection(collection, collectionSet, groupId: groupId);
}

private async Task RemoveCollection(BoxSet boxSet, ISet<Guid> allBoxSets, string? seriesId = null, string? groupId = null)
private async Task RemoveCollection(BoxSet boxSet, HashSet<Guid> allBoxSets, string? seriesId = null, string? groupId = null)
{
var parents = boxSet.GetParents().OfType<BoxSet>().ToList();
var children = boxSet.GetChildren(null, true, new()).Select(x => x.Id).ToList();
Expand All @@ -457,7 +457,7 @@ private async Task RemoveCollection(BoxSet boxSet, ISet<Guid> allBoxSets, string
LibraryManager.DeleteItem(boxSet, new() { DeleteFileLocation = false, DeleteFromExternalProvider = false });
}

private IReadOnlyList<Movie> GetMovies()
private List<Movie> GetMovies()
{
return LibraryManager.GetItemList(new()
{
Expand All @@ -471,7 +471,7 @@ private IReadOnlyList<Movie> GetMovies()
.ToList();
}

private IReadOnlyList<Series> GetShows()
private List<Series> GetShows()
{
return LibraryManager.GetItemList(new()
{
Expand All @@ -485,7 +485,7 @@ private IReadOnlyList<Series> GetShows()
.ToList();
}

private IReadOnlyDictionary<string, IReadOnlyList<BoxSet>> GetSeriesCollections()
private Dictionary<string, IReadOnlyList<BoxSet>> GetSeriesCollections()
{
return LibraryManager.GetItemList(new()
{
Expand All @@ -501,7 +501,7 @@ private IReadOnlyDictionary<string, IReadOnlyList<BoxSet>> GetSeriesCollections(
.ToDictionary(x => x.Key, x => x.ToList() as IReadOnlyList<BoxSet>);
}

private IReadOnlyDictionary<string, IReadOnlyList<BoxSet>> GetGroupCollections()
private Dictionary<string, IReadOnlyList<BoxSet>> GetGroupCollections()
{
return LibraryManager.GetItemList(new()
{
Expand Down

0 comments on commit 32324c8

Please sign in to comment.