twitch vod downloading done

ffmpeg essentials

fix

Project reorganized

git lfs

ffmpeg removed

ffmpeg added
This commit is contained in:
2024-02-14 02:07:22 +01:00
Unverified
parent 91f9b645bd
commit e3ec5c3a48
264 changed files with 6239 additions and 4014 deletions

View File

@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<UserControl
x:Class="VDownload.Toolkit.UI.Controls.TimeSpanControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
x:Name="Control"
Loaded="Control_Loaded">
<StackPanel Orientation="Horizontal" Spacing="4">
<NumberBox x:Name="Hours" SpinButtonPlacementMode="Compact" Minimum="0" Value="0" ValueChanged="ValueChanged"/>
<TextBlock VerticalAlignment="Center" Padding="0,0,0,5" Text=":"/>
<NumberBox x:Name="Minutes" SpinButtonPlacementMode="Compact" Minimum="0" Value="0" Maximum="59" ValueChanged="ValueChanged"/>
<TextBlock VerticalAlignment="Center" Padding="0,0,0,5" Text=":"/>
<NumberBox x:Name="Seconds" SpinButtonPlacementMode="Compact" Minimum="0" Value="0" Maximum="59" ValueChanged="ValueChanged"/>
</StackPanel>
</UserControl>

View File

@@ -0,0 +1,119 @@
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml.Controls.Primitives;
using Microsoft.UI.Xaml.Data;
using Microsoft.UI.Xaml.Input;
using Microsoft.UI.Xaml.Media;
using Microsoft.UI.Xaml.Navigation;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.Foundation;
using Windows.Foundation.Collections;
namespace VDownload.Toolkit.UI.Controls
{
public sealed partial class TimeSpanControl : UserControl
{
#region PROPERTIES
public TimeSpan Value
{
get => (TimeSpan)GetValue(ValueProperty);
set => SetValue(ValueProperty, value);
}
public static readonly DependencyProperty ValueProperty = DependencyProperty.Register("Value", typeof(TimeSpan), typeof(TimeSpanControl), new PropertyMetadata(TimeSpan.Zero, new PropertyChangedCallback(ValuePropertyChanged)));
public TimeSpan Maximum
{
get => (TimeSpan)GetValue(MaximumProperty);
set => SetValue(MaximumProperty, value);
}
public static readonly DependencyProperty MaximumProperty = DependencyProperty.Register("Maximum", typeof(TimeSpan), typeof(TimeSpanControl), new PropertyMetadata(TimeSpan.MaxValue, new PropertyChangedCallback(RangePropertyChanged)));
public TimeSpan Minimum
{
get => (TimeSpan)GetValue(MinimumProperty);
set => SetValue(MinimumProperty, value);
}
public static readonly DependencyProperty MinimumProperty = DependencyProperty.Register("Minimum", typeof(TimeSpan), typeof(TimeSpanControl), new PropertyMetadata(TimeSpan.Zero, new PropertyChangedCallback(RangePropertyChanged)));
#endregion
#region CONSTRUCTORS
public TimeSpanControl()
{
this.InitializeComponent();
}
#endregion
#region PRIVATE METHODS
private void UpdateOnChanges()
{
if (this.IsLoaded)
{
TimeSpan hoursTimeSpan = TimeSpan.FromHours(Hours.Value);
TimeSpan minutesTimeSpan = TimeSpan.FromMinutes(Minutes.Value);
TimeSpan secondsTimeSpan = TimeSpan.FromSeconds(Seconds.Value);
TimeSpan value = secondsTimeSpan + minutesTimeSpan + hoursTimeSpan;
if (value >= Maximum)
{
Hours.Value = Math.Floor(Maximum.TotalHours);
Minutes.Value = Maximum.Minutes;
Seconds.Value = Maximum.Seconds;
}
else if (value <= Minimum)
{
Hours.Value = Math.Floor(Minimum.TotalHours);
Minutes.Value = Minimum.Minutes;
Seconds.Value = Minimum.Seconds;
}
Value = value;
}
}
private void UpdateOnValueChange()
{
if (this.IsLoaded)
{
TimeSpan value = Value;
if (value > Maximum)
{
value = Maximum;
}
else if (value < Minimum)
{
value = Minimum;
}
Hours.Value = Math.Floor(value.TotalHours);
Minutes.Value = value.Minutes;
Seconds.Value = value.Seconds;
}
}
#endregion
#region EVENT HANDLERS
private void ValueChanged(NumberBox sender, NumberBoxValueChangedEventArgs args) => UpdateOnChanges();
private static void ValuePropertyChanged(DependencyObject obj, DependencyPropertyChangedEventArgs e) => ((TimeSpanControl)obj).UpdateOnValueChange();
private static void RangePropertyChanged(DependencyObject obj, DependencyPropertyChangedEventArgs e) => ((TimeSpanControl)obj).UpdateOnChanges();
private void Control_Loaded(object sender, RoutedEventArgs e) => UpdateOnValueChange();
#endregion
}
}

View File

@@ -0,0 +1,24 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0-windows10.0.19041.0</TargetFramework>
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
<RootNamespace>VDownload.Toolkit.UI.Controls</RootNamespace>
<RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
<UseWinUI>true</UseWinUI>
<UseRidGraph>true</UseRidGraph>
</PropertyGroup>
<ItemGroup>
<None Remove="TimeSpanControl.xaml" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.4.240211001" />
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.2428" />
</ItemGroup>
<ItemGroup>
<Page Update="TimeSpanControl.xaml">
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
</Project>