-
Notifications
You must be signed in to change notification settings - Fork 187
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add option to sort by play count (#931)
* Add option to sort by Play Count. * Flesh out sorting by play count Adds category headers for played and unplayed songs SettingsManager now tracks previous sort order. Unplayed songs are now sorted in whatever order was previously used before switching to play count order. * Improve play count sort behavior when only bots are connected. Remove unnecessary _sortPlaycounts variable in SongContainer Disallow offering Play Count sort in PopupMenu if there are no non-bot profiles connected Add check to MusicLibraryMenu.OnEnable to change sort order from Play Count if no non-bot profiles connected Update SongContainer.GetPlaycounts to handle situation where bot profile manages to have Play Count sort selected or Play Count is selected when no profiles are connected * Title sort by default when sort order from profile is unrecognized. Only count plays with the profile's current instrument when calculating play count. As a fallback, if the current instrument is invalid, all plays by the current/first non-bot profile will be returned. Update PlayerContainer to also force a reload on change of active profiles when current sort is Playcount. * Address review comments by EliteAsian123 Make GetSortedCategory switch fallback use less arcane syntax. Add OnlyHasBots method to PlayerContainer to check for non-bot players and use that instead of repeating a LINQ expression in several different places. * Accept songs with duplicate hash in play count sorted list.
- Loading branch information
Showing
7 changed files
with
130 additions
and
7 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
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
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
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
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
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
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