Implemented tag refresh on a playlist. Made audio file scanning truly asynchronous. Added basic playlist sorting functionality.
This commit is contained in:
@@ -160,24 +160,30 @@
|
||||
</Style>
|
||||
</MenuFlyout.MenuFlyoutPresenterStyle>
|
||||
<MenuFlyoutItem Text="Refresh Tags" Command="{Binding RefreshTagsCommand}">
|
||||
|
||||
</MenuFlyoutItem>
|
||||
|
||||
<MenuFlyoutItem Text="Remove Duplicates" Command="{Binding RemoveDuplicateSongsCommand}">
|
||||
|
||||
</MenuFlyoutItem>
|
||||
|
||||
<MenuFlyoutItem Text="Remove Missing" Command="{Binding RemoveMissingSongsCommand}">
|
||||
|
||||
</MenuFlyoutItem>
|
||||
|
||||
<MenuFlyoutItem Text="Lock Playlist">
|
||||
|
||||
</MenuFlyoutItem>
|
||||
|
||||
<MenuFlyoutSeparator></MenuFlyoutSeparator>
|
||||
|
||||
<MenuFlyoutItem Text="Remove Playlist" Foreground="#ff99a4" Command="{Binding DeletePlaylistCommand}">
|
||||
|
||||
</MenuFlyoutItem>
|
||||
|
||||
<MenuFlyoutSeparator></MenuFlyoutSeparator>
|
||||
|
||||
<MenuFlyoutSubItem x:Name="SortByMenuFlyoutSubItem" Text="Sort By...">
|
||||
</MenuFlyoutSubItem>
|
||||
|
||||
<MenuFlyoutSeparator></MenuFlyoutSeparator>
|
||||
|
||||
<MenuFlyoutItem Text="Settings">
|
||||
|
||||
</MenuFlyoutItem>
|
||||
</MenuFlyout>
|
||||
</Button.Flyout>
|
||||
@@ -228,6 +234,12 @@
|
||||
</MenuFlyoutItem.KeyboardAccelerators>
|
||||
</MenuFlyoutItem>
|
||||
<MenuFlyoutSeparator></MenuFlyoutSeparator>
|
||||
<MenuFlyoutSubItem x:Name="SortSelectedByMenuFlyoutSubItem" Text="Sort By...">
|
||||
<MenuFlyoutSubItem.Icon>
|
||||
<PathIcon Data="{StaticResource SortIcon}"></PathIcon>
|
||||
</MenuFlyoutSubItem.Icon>
|
||||
</MenuFlyoutSubItem>
|
||||
<MenuFlyoutSeparator></MenuFlyoutSeparator>
|
||||
<MenuFlyoutItem Text="Cut" Command="{Binding CutSongsCommand}">
|
||||
<MenuFlyoutItem.Icon>
|
||||
<PathIcon Data="{StaticResource CutIcon}"></PathIcon>
|
||||
|
||||
@@ -35,6 +35,28 @@ public sealed partial class PlaylistDetailView : UserControl
|
||||
{
|
||||
item.DataContextChanged += Item_DataContextChanged;
|
||||
}
|
||||
|
||||
foreach (SortItem sortItem in _viewModel.SortItems)
|
||||
{
|
||||
SortByMenuFlyoutSubItem.Items.Add(new MenuFlyoutItem
|
||||
{
|
||||
Text = sortItem.Name,
|
||||
Command = _viewModel.SortAllCommand,
|
||||
CommandParameter = sortItem
|
||||
});
|
||||
|
||||
SortSelectedByMenuFlyoutSubItem.Items.Add(new MenuFlyoutItem
|
||||
{
|
||||
Text = sortItem.Name,
|
||||
Command = _viewModel.SortSelectedCommand,
|
||||
CommandParameter = sortItem
|
||||
});
|
||||
}
|
||||
|
||||
_viewModel.SortSelectedCommand.CanExecuteChanged += (_, _) =>
|
||||
SortSelectedByMenuFlyoutSubItem.IsEnabled = _viewModel.SortSelectedCommand.CanExecute(null);
|
||||
|
||||
SortSelectedByMenuFlyoutSubItem.IsEnabled = _viewModel.SortSelectedCommand.CanExecute(null);
|
||||
}
|
||||
|
||||
private void OnViewModelPropertyChanging(object? sender, PropertyChangingEventArgs e)
|
||||
|
||||
Reference in New Issue
Block a user