Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(Web-UI): The Plex servers on the left side are now ordered from …
…owned to then sorted by name
- Loading branch information
1 parent
9c6cad9
commit dec9bb0
Showing
2 changed files
with
46 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
using NaturalSort.Extension; | ||
|
||
namespace PlexRipper.Domain; | ||
|
||
public static class PlexServerListExtensions | ||
{ | ||
#region Methods | ||
|
||
#region Public | ||
|
||
public static List<PlexServer> SortByOwnedOrder(this List<PlexServer> plexServers) | ||
{ | ||
return plexServers | ||
.OrderByDescending(x => x.Owned) | ||
.ThenBy(x => x.Name, StringComparison.OrdinalIgnoreCase.WithNaturalSort()) | ||
.ToList(); | ||
} | ||
|
||
#endregion | ||
|
||
#endregion | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters