Skip to content

Commit

Permalink
Add information about lowest quality order and hardware acceleration …
Browse files Browse the repository at this point in the history
…availability to UI
  • Loading branch information
0x90d committed Sep 20, 2023
1 parent b358888 commit 76628f3
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 3 deletions.
6 changes: 4 additions & 2 deletions VDF.GUI/ViewModels/MainWindowVM.cs
Original file line number Diff line number Diff line change
Expand Up @@ -357,14 +357,16 @@ void BuildDuplicatesView() {



public static ReactiveCommand<Unit, Unit> LatestReleaseCommand => ReactiveCommand.Create(() => {
public static ReactiveCommand<Unit, Unit> LatestReleaseCommand => ReactiveCommand.CreateFromTask(async () => {
try {
Process.Start(new ProcessStartInfo {
FileName = "https://github.com/0x90d/videoduplicatefinder/releases",
UseShellExecute = true
});
}
catch { }
catch {
await MessageBoxService.Show("Failed to open URL: https://github.com/0x90d/videoduplicatefinder/releases");
}
});
public static ReactiveCommand<Unit, Unit> OpenOwnFolderCommand => ReactiveCommand.Create(() => {
Process.Start(new ProcessStartInfo {
Expand Down
12 changes: 12 additions & 0 deletions VDF.GUI/ViewModels/MainWindowVM_Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
// */
//

using System.Diagnostics;
using System.Linq;
using System.Reactive;
using System.Reflection;
Expand Down Expand Up @@ -58,6 +59,17 @@ void Instance_LogItemAdded(string message) =>
LogItems.Add(message);
});

public ReactiveCommand<Unit, Unit> OpenHWInfoLinkCommand => ReactiveCommand.CreateFromTask(async () => {
try {
Process.Start(new ProcessStartInfo {
FileName = "https://trac.ffmpeg.org/wiki/HWAccelIntro#PlatformAPIAvailability",
UseShellExecute = true
});
}
catch {
await MessageBoxService.Show("Failed to open URL: https://trac.ffmpeg.org/wiki/HWAccelIntro#PlatformAPIAvailability");
}
});
public ReactiveCommand<Unit, Unit> AddIncludesToListCommand => ReactiveCommand.CreateFromTask(async () => {
var result = await Utils.PickerDialogUtils.OpenDialogPicker(
new FolderPickerOpenOptions() {
Expand Down
25 changes: 24 additions & 1 deletion VDF.GUI/Views/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,23 @@
<mvvm:IsBestConverter x:Key="IsBestConverter" />
<mvvm:ExtraShortDateTimeConverter x:Key="ExtraShortDateTimeConverter" />
</Window.Resources>
<Window.Styles>
<Style Selector="Button.hyperlink">
<Setter Property="Template">
<ControlTemplate>
<TextBlock Text="{TemplateBinding Content}" Foreground="{StaticResource SystemAccentColor}" TextDecorations="Underline">
<TextBlock.Styles>
<Style Selector="TextBlock:pointerover">
<Setter Property="Foreground" Value="{StaticResource SystemAccentColorLight1}"/>
</Style>
</TextBlock.Styles>
</TextBlock>
</ControlTemplate>
</Setter>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="BorderThickness" Value="0"/>
</Style>
</Window.Styles>
<Border BorderBrush="{DynamicResource SystemControlBackgroundChromeMediumBrush}" BorderThickness="2">
<Grid>
<controls:ExperimentalAcrylicBorder
Expand Down Expand Up @@ -377,7 +394,7 @@
<TextBlock
VerticalAlignment="Center"
Text="Select Lowest Duration / Quality"
ToolTip.Tip="Keep longest / Best Quality" />
ToolTip.Tip="Keep longest / Best Quality. The order is: Duration, Resolution, FPS, Bitrate, Audio Bitrate" />
</MenuItem.Header>
</MenuItem>
<MenuItem Header="Date">
Expand Down Expand Up @@ -1463,10 +1480,16 @@
VerticalAlignment="Center"
Text="{Binding Source={x:Static Settings:SettingsFile.Instance}, Path=CustomFFArguments}"
ToolTip.Tip="FF(mpeg/probe) arguments passed to the end of the internal arguments. Most users can leave this empty." />
<StackPanel Orientation="Horizontal">
<TextBlock
VerticalAlignment="Center"
FontSize="14"
Text="Hardware Acceleration:" />
<Button Command="{Binding OpenHWInfoLinkCommand}"
Margin="10,0,0,0"
Classes="hyperlink"
Content="More Info"/>
</StackPanel>
<ComboBox
x:Name="ComboboxHardwareAccelerationMode"
VerticalAlignment="Center"
Expand Down

0 comments on commit 76628f3

Please sign in to comment.