1.0-dev12 (Schedule feature adiing started)

This commit is contained in:
2022-03-03 14:08:43 +01:00
Unverified
parent bcdb1dd246
commit 37c42883d8
18 changed files with 79 additions and 20 deletions

View File

@@ -10,7 +10,7 @@ VDownload is universal video downloader written in .NET/C# and Universal Windows
## Download and installation ## Download and installation
- Microsoft Store - Microsoft Store
- GitHub Release - GitHub Releases
@@ -29,6 +29,7 @@ VDownload is universal video downloader written in .NET/C# and Universal Windows
- Video downloading - Video downloading
- Audio-only, video-only and audio-video downloading - Audio-only, video-only and audio-video downloading
- Time trimming - download only the fragment you need - Time trimming - download only the fragment you need
- Task scheduling - start downloading after a certain amount of time
- Playlist downloading - Playlist downloading
- Playlist filtering - download only the videos you need - Playlist filtering - download only the videos you need
- Playlist subscription - download new videos from saved playlists - Playlist subscription - download new videos from saved playlists
@@ -50,6 +51,7 @@ If you want to support me and the development of the project you can:
- **Donate me** via Paypal (link in the "Sponsor this project" section in Github repository and in the app itself in the "About" page) - **Donate me** via Paypal (link in the "Sponsor this project" section in Github repository and in the app itself in the "About" page)
- **Report bugs and errors** in the "Issues" section of Github repository - **Report bugs and errors** in the "Issues" section of Github repository
- **Propose new features and support of video services** in the "Issues" section of Github repository - **Propose new features and support of video services** in the "Issues" section of Github repository
- **Translate the application into a language you know**
#### App development status #### App development status

View File

@@ -3,6 +3,7 @@
public enum TaskStatus public enum TaskStatus
{ {
Idle, Idle,
Scheduled,
Waiting, Waiting,
InProgress InProgress
} }

View File

@@ -16,5 +16,6 @@ namespace VDownload.Core.EventArgs
public string Filename { get; set; } public string Filename { get; set; }
public MediaFileExtension Extension { get; set; } public MediaFileExtension Extension { get; set; }
public StorageFolder Location { get; set; } public StorageFolder Location { get; set; }
public double Schedule { get; set; }
} }
} }

View File

@@ -0,0 +1,3 @@
<svg fill="#FFFFFF" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1600 1600"><g transform="matrix(1.14286,0,0,1.14286,0,0)">
<path d="M383.333,0C172.216,0 0,172.216 0,383.333C0,594.45 172.216,766.667 383.333,766.667C594.45,766.667 766.667,594.45 766.667,383.333C766.667,172.216 594.45,0 383.333,0ZM383.333,100C540.406,100 666.667,226.26 666.667,383.333C666.667,540.406 540.406,666.667 383.333,666.667C226.26,666.667 100,540.406 100,383.333C100,226.26 226.26,100 383.333,100ZM382.552,165.951C355.148,166.379 332.94,189.262 333.333,216.667L333.333,383.333C333.336,396.588 338.609,409.313 347.982,418.685L414.648,485.352C424.074,495.168 437.11,500.724 450.719,500.724C478.151,500.724 500.724,478.151 500.724,450.719C500.724,437.11 495.168,424.074 485.352,414.648L433.333,362.63L433.333,216.667C433.337,216.428 433.338,216.189 433.338,215.949C433.338,188.517 410.765,165.944 383.333,165.944C383.073,165.944 382.813,165.946 382.552,165.951ZM794.01,200C808.144,231.6 818.792,265.067 825.326,300L1183.33,300C1247.67,300 1300,352.333 1300,416.667L1300,466.667L825.326,466.667C818.759,501.6 808.11,535.067 794.01,566.667L1300,566.667L1300,1183.33C1300,1247.67 1247.67,1300 1183.33,1300L416.667,1300C352.333,1300 300,1247.67 300,1183.33L300,825.326C265.067,818.759 231.6,808.11 200,794.01L200,1183.33C200,1302.8 297.2,1400 416.667,1400L1183.33,1400C1302.8,1400 1400,1302.8 1400,1183.33L1400,416.667C1400,297.2 1302.8,200 1183.33,200L794.01,200ZM800,700C754.285,700 716.667,737.618 716.667,783.333C716.667,829.049 754.285,866.667 800,866.667C845.715,866.667 883.333,829.049 883.333,783.333C883.333,737.618 845.715,700 800,700ZM1083.33,700C1037.62,700 1000,737.618 1000,783.333C1000,829.049 1037.62,866.667 1083.33,866.667C1129.05,866.667 1166.67,829.049 1166.67,783.333C1166.67,737.618 1129.05,700 1083.33,700ZM516.667,1000C470.951,1000 433.333,1037.62 433.333,1083.33C433.333,1129.05 470.951,1166.67 516.667,1166.67C562.382,1166.67 600,1129.05 600,1083.33C600,1037.62 562.382,1000 516.667,1000ZM800,1000C754.285,1000 716.667,1037.62 716.667,1083.33C716.667,1129.05 754.285,1166.67 800,1166.67C845.715,1166.67 883.333,1129.05 883.333,1083.33C883.333,1037.62 845.715,1000 800,1000Z" style="fill-rule:nonzero;"/>
</g></svg>

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@@ -0,0 +1,3 @@
<svg fill="#000000" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1600 1600"><g transform="matrix(1.14286,0,0,1.14286,0,0)">
<path d="M383.333,0C172.216,0 0,172.216 0,383.333C0,594.45 172.216,766.667 383.333,766.667C594.45,766.667 766.667,594.45 766.667,383.333C766.667,172.216 594.45,0 383.333,0ZM383.333,100C540.406,100 666.667,226.26 666.667,383.333C666.667,540.406 540.406,666.667 383.333,666.667C226.26,666.667 100,540.406 100,383.333C100,226.26 226.26,100 383.333,100ZM382.552,165.951C355.148,166.379 332.94,189.262 333.333,216.667L333.333,383.333C333.336,396.588 338.609,409.313 347.982,418.685L414.648,485.352C424.074,495.168 437.11,500.724 450.719,500.724C478.151,500.724 500.724,478.151 500.724,450.719C500.724,437.11 495.168,424.074 485.352,414.648L433.333,362.63L433.333,216.667C433.337,216.428 433.338,216.189 433.338,215.949C433.338,188.517 410.765,165.944 383.333,165.944C383.073,165.944 382.813,165.946 382.552,165.951ZM794.01,200C808.144,231.6 818.792,265.067 825.326,300L1183.33,300C1247.67,300 1300,352.333 1300,416.667L1300,466.667L825.326,466.667C818.759,501.6 808.11,535.067 794.01,566.667L1300,566.667L1300,1183.33C1300,1247.67 1247.67,1300 1183.33,1300L416.667,1300C352.333,1300 300,1247.67 300,1183.33L300,825.326C265.067,818.759 231.6,808.11 200,794.01L200,1183.33C200,1302.8 297.2,1400 416.667,1400L1183.33,1400C1302.8,1400 1400,1302.8 1400,1183.33L1400,416.667C1400,297.2 1302.8,200 1183.33,200L794.01,200ZM800,700C754.285,700 716.667,737.618 716.667,783.333C716.667,829.049 754.285,866.667 800,866.667C845.715,866.667 883.333,829.049 883.333,783.333C883.333,737.618 845.715,700 800,700ZM1083.33,700C1037.62,700 1000,737.618 1000,783.333C1000,829.049 1037.62,866.667 1083.33,866.667C1129.05,866.667 1166.67,829.049 1166.67,783.333C1166.67,737.618 1129.05,700 1083.33,700ZM516.667,1000C470.951,1000 433.333,1037.62 433.333,1083.33C433.333,1129.05 470.951,1166.67 516.667,1166.67C562.382,1166.67 600,1129.05 600,1083.33C600,1037.62 562.382,1000 516.667,1000ZM800,1000C754.285,1000 716.667,1037.62 716.667,1083.33C716.667,1129.05 754.285,1166.67 800,1166.67C845.715,1166.67 883.333,1129.05 883.333,1083.33C883.333,1037.62 845.715,1000 800,1000Z" style="fill-rule:nonzero;"/>
</g></svg>

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@@ -0,0 +1,3 @@
<svg fill="#FFFFFF" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1600 1600"><g transform="matrix(1.1995,0,0,1.1995,-159.6,-159.6)">
<path d="M800,133.333C432.402,133.333 133.333,432.402 133.333,800C133.333,1167.6 432.402,1466.67 800,1466.67C1167.6,1466.67 1466.67,1167.6 1466.67,800C1466.67,432.402 1167.6,133.333 800,133.333ZM800,233.333C1113.55,233.333 1366.67,486.446 1366.67,800C1366.67,1113.55 1113.55,1366.67 800,1366.67C486.446,1366.67 233.333,1113.55 233.333,800C233.333,486.446 486.446,233.333 800,233.333ZM849.479,549.479C822.052,549.486 799.486,572.057 799.486,599.484C799.486,612.992 804.96,625.939 814.648,635.352L929.297,750L550,750C549.764,749.997 549.529,749.995 549.293,749.995C521.861,749.995 499.288,772.568 499.288,800C499.288,827.432 521.861,850.005 549.293,850.005C549.529,850.005 549.764,850.003 550,850L929.297,850L814.648,964.648C804.832,974.074 799.276,987.11 799.276,1000.72C799.276,1028.15 821.849,1050.72 849.281,1050.72C862.89,1050.72 875.926,1045.17 885.352,1035.35L1085.35,835.352C1104.74,815.956 1104.74,784.044 1085.35,764.648L885.352,564.648C875.939,554.956 862.99,549.48 849.479,549.479Z" style="fill-rule:nonzero;"/>
</g></svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -0,0 +1,3 @@
<svg fill="#000000" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1600 1600"><g transform="matrix(1.1995,0,0,1.1995,-159.6,-159.6)">
<path d="M800,133.333C432.402,133.333 133.333,432.402 133.333,800C133.333,1167.6 432.402,1466.67 800,1466.67C1167.6,1466.67 1466.67,1167.6 1466.67,800C1466.67,432.402 1167.6,133.333 800,133.333ZM800,233.333C1113.55,233.333 1366.67,486.446 1366.67,800C1366.67,1113.55 1113.55,1366.67 800,1366.67C486.446,1366.67 233.333,1113.55 233.333,800C233.333,486.446 486.446,233.333 800,233.333ZM849.479,549.479C822.052,549.486 799.486,572.057 799.486,599.484C799.486,612.992 804.96,625.939 814.648,635.352L929.297,750L550,750C549.764,749.997 549.529,749.995 549.293,749.995C521.861,749.995 499.288,772.568 499.288,800C499.288,827.432 521.861,850.005 549.293,850.005C549.529,850.005 549.764,850.003 550,850L929.297,850L814.648,964.648C804.832,974.074 799.276,987.11 799.276,1000.72C799.276,1028.15 821.849,1050.72 849.281,1050.72C862.89,1050.72 875.926,1045.17 885.352,1035.35L1085.35,835.352C1104.74,815.956 1104.74,784.044 1085.35,764.648L885.352,564.648C875.939,554.956 862.99,549.48 849.479,549.479Z" style="fill-rule:nonzero;"/>
</g></svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 267 KiB

View File

@@ -0,0 +1,12 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1600 1600"><g transform="matrix(1.29514,0,0,1.29514,-236.108,-299.865)">
<path d="M1400,922.533C1300,1037.23 1200,1151.93 1100,1266.67L866.667,1266.67C788.9,1333.33 711.1,1400 633.333,1466.67L533.333,1466.67L533.333,1266.67L200,1266.67L200,523.533C248.5,426.8 296.967,330.067 345.467,233.333L1400,233.333L1400,922.533Z" style="fill:rgb(126,87,194);fill-rule:nonzero;"/>
</g>
<g transform="matrix(1.29514,0,0,1.29514,-236.108,-299.865)">
<path d="M1300,878.967C1244.43,941.533 1188.9,1004.1 1133.33,1066.67L900,1066.67C822.233,1133.33 744.433,1200 666.667,1266.67L666.667,1066.67C577.767,1066.4 488.9,1066.13 400,1065.87L400,333.333L1300,333.333L1300,878.967Z" style="fill:rgb(250,250,250);fill-rule:nonzero;"/>
</g>
<g transform="matrix(1.29514,0,0,1.29514,-236.108,-299.865)">
<rect x="700" y="533.333" width="100" height="333.333" style="fill:rgb(126,87,194);"/>
</g>
<g transform="matrix(1.29514,0,0,1.29514,-236.108,-299.865)">
<rect x="1000" y="533.333" width="100" height="333.333" style="fill:rgb(126,87,194);"/>
</g></svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 267 KiB

After

Width:  |  Height:  |  Size: 31 KiB

View File

@@ -29,11 +29,11 @@
<Grid MinHeight="65" Padding="18" CornerRadius="{ThemeResource ControlCornerRadius}" Background="{ThemeResource SettingControlBackgroundColor}"> <Grid MinHeight="65" Padding="18" CornerRadius="{ThemeResource ControlCornerRadius}" Background="{ThemeResource SettingControlBackgroundColor}">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="18"/>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="18"/> <ColumnDefinition Width="18"/>
<ColumnDefinition/> <ColumnDefinition/>
<ColumnDefinition Width="18"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<!-- ICON --> <!-- ICON -->

View File

@@ -1,9 +1,6 @@
<ResourceDictionary <ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<!-- THEMED ICONS -->
<ResourceDictionary.ThemeDictionaries> <ResourceDictionary.ThemeDictionaries>
<ResourceDictionary x:Key="Light"> <ResourceDictionary x:Key="Light">
<SvgImageSource x:Key="AuthorIcon" UriSource="ms-appx:///Assets/Icons/AuthorLight.svg"/> <SvgImageSource x:Key="AuthorIcon" UriSource="ms-appx:///Assets/Icons/AuthorLight.svg"/>
@@ -15,6 +12,7 @@
<SvgImageSource x:Key="TrimIcon" UriSource="ms-appx:///Assets/Icons/TrimLight.svg"/> <SvgImageSource x:Key="TrimIcon" UriSource="ms-appx:///Assets/Icons/TrimLight.svg"/>
<SvgImageSource x:Key="FileIcon" UriSource="ms-appx:///Assets/Icons/FileLight.svg"/> <SvgImageSource x:Key="FileIcon" UriSource="ms-appx:///Assets/Icons/FileLight.svg"/>
<SvgImageSource x:Key="LocationIcon" UriSource="ms-appx:///Assets/Icons/LocationLight.svg"/> <SvgImageSource x:Key="LocationIcon" UriSource="ms-appx:///Assets/Icons/LocationLight.svg"/>
<SvgImageSource x:Key="ScheduleIcon" UriSource="ms-appx:///Assets/Icons/ScheduleLight.svg"/>
<SvgImageSource x:Key="StateIdleIcon" UriSource="ms-appx:///Assets/Icons/StateIdleLight.svg"/> <SvgImageSource x:Key="StateIdleIcon" UriSource="ms-appx:///Assets/Icons/StateIdleLight.svg"/>
<SvgImageSource x:Key="StateWaitingIcon" UriSource="ms-appx:///Assets/Icons/StateWaitingLight.svg"/> <SvgImageSource x:Key="StateWaitingIcon" UriSource="ms-appx:///Assets/Icons/StateWaitingLight.svg"/>
<SvgImageSource x:Key="StateCancelledIcon" UriSource="ms-appx:///Assets/Icons/StateCancelledLight.svg"/> <SvgImageSource x:Key="StateCancelledIcon" UriSource="ms-appx:///Assets/Icons/StateCancelledLight.svg"/>
@@ -23,6 +21,7 @@
<SvgImageSource x:Key="StateDoneIcon" UriSource="ms-appx:///Assets/Icons/StateDoneLight.svg"/> <SvgImageSource x:Key="StateDoneIcon" UriSource="ms-appx:///Assets/Icons/StateDoneLight.svg"/>
<SvgImageSource x:Key="StateFinalizingIcon" UriSource="ms-appx:///Assets/Icons/StateFinalizingLight.svg"/> <SvgImageSource x:Key="StateFinalizingIcon" UriSource="ms-appx:///Assets/Icons/StateFinalizingLight.svg"/>
<SvgImageSource x:Key="StateProcessingIcon" UriSource="ms-appx:///Assets/Icons/StateProcessingLight.svg"/> <SvgImageSource x:Key="StateProcessingIcon" UriSource="ms-appx:///Assets/Icons/StateProcessingLight.svg"/>
<SvgImageSource x:Key="StateScheduledIcon" UriSource="ms-appx:///Assets/Icons/StateScheduledLight.svg"/>
</ResourceDictionary> </ResourceDictionary>
<ResourceDictionary x:Key="Dark"> <ResourceDictionary x:Key="Dark">
<SvgImageSource x:Key="AuthorIcon" UriSource="ms-appx:///Assets/Icons/AuthorDark.svg"/> <SvgImageSource x:Key="AuthorIcon" UriSource="ms-appx:///Assets/Icons/AuthorDark.svg"/>
@@ -34,6 +33,7 @@
<SvgImageSource x:Key="TrimIcon" UriSource="ms-appx:///Assets/Icons/TrimDark.svg"/> <SvgImageSource x:Key="TrimIcon" UriSource="ms-appx:///Assets/Icons/TrimDark.svg"/>
<SvgImageSource x:Key="FileIcon" UriSource="ms-appx:///Assets/Icons/FileDark.svg"/> <SvgImageSource x:Key="FileIcon" UriSource="ms-appx:///Assets/Icons/FileDark.svg"/>
<SvgImageSource x:Key="LocationIcon" UriSource="ms-appx:///Assets/Icons/LocationDark.svg"/> <SvgImageSource x:Key="LocationIcon" UriSource="ms-appx:///Assets/Icons/LocationDark.svg"/>
<SvgImageSource x:Key="ScheduleIcon" UriSource="ms-appx:///Assets/Icons/ScheduleDark.svg"/>
<SvgImageSource x:Key="StateIdleIcon" UriSource="ms-appx:///Assets/Icons/StateIdleDark.svg"/> <SvgImageSource x:Key="StateIdleIcon" UriSource="ms-appx:///Assets/Icons/StateIdleDark.svg"/>
<SvgImageSource x:Key="StateWaitingIcon" UriSource="ms-appx:///Assets/Icons/StateWaitingDark.svg"/> <SvgImageSource x:Key="StateWaitingIcon" UriSource="ms-appx:///Assets/Icons/StateWaitingDark.svg"/>
<SvgImageSource x:Key="StateCancelledIcon" UriSource="ms-appx:///Assets/Icons/StateCancelledDark.svg"/> <SvgImageSource x:Key="StateCancelledIcon" UriSource="ms-appx:///Assets/Icons/StateCancelledDark.svg"/>
@@ -42,14 +42,9 @@
<SvgImageSource x:Key="StateDoneIcon" UriSource="ms-appx:///Assets/Icons/StateDoneDark.svg"/> <SvgImageSource x:Key="StateDoneIcon" UriSource="ms-appx:///Assets/Icons/StateDoneDark.svg"/>
<SvgImageSource x:Key="StateFinalizingIcon" UriSource="ms-appx:///Assets/Icons/StateFinalizingDark.svg"/> <SvgImageSource x:Key="StateFinalizingIcon" UriSource="ms-appx:///Assets/Icons/StateFinalizingDark.svg"/>
<SvgImageSource x:Key="StateProcessingIcon" UriSource="ms-appx:///Assets/Icons/StateProcessingDark.svg"/> <SvgImageSource x:Key="StateProcessingIcon" UriSource="ms-appx:///Assets/Icons/StateProcessingDark.svg"/>
<SvgImageSource x:Key="StateScheduledIcon" UriSource="ms-appx:///Assets/Icons/StateScheduledDark.svg"/>
</ResourceDictionary> </ResourceDictionary>
</ResourceDictionary.ThemeDictionaries> </ResourceDictionary.ThemeDictionaries>
<SvgImageSource x:Key="TwitchIcon" UriSource="ms-appx:///Assets/Icons/Twitch.svg"/>
<!-- SOURCE ICONS -->
<BitmapImage x:Key="TwitchIcon" UriSource="ms-appx:///Assets/Icons/Twitch.png"/>
<!-- OTHER ICONS-->
<SvgImageSource x:Key="ErrorIcon" UriSource="ms-appx:///Assets/Icons/Error.svg"/> <SvgImageSource x:Key="ErrorIcon" UriSource="ms-appx:///Assets/Icons/Error.svg"/>
</ResourceDictionary> </ResourceDictionary>

View File

@@ -241,6 +241,15 @@ The number in the numberbox indicades how many videos will be got from playlist.
<data name="HomeVideoAddingQualitySettingControl.Title" xml:space="preserve"> <data name="HomeVideoAddingQualitySettingControl.Title" xml:space="preserve">
<value>Quality</value> <value>Quality</value>
</data> </data>
<data name="HomeVideoAddingScheduleSettingControl.Description" xml:space="preserve">
<value>Number of minutes to start the task (after clicking downloading button).</value>
</data>
<data name="HomeVideoAddingScheduleSettingControl.Title" xml:space="preserve">
<value>Schedule</value>
</data>
<data name="HomeVideoAddingTaskOptionsHeaderTextBlock.Text" xml:space="preserve">
<value>Task options</value>
</data>
<data name="HomeVideoAddingTrimSettingControl.Title" xml:space="preserve"> <data name="HomeVideoAddingTrimSettingControl.Title" xml:space="preserve">
<value>Trim</value> <value>Trim</value>
</data> </data>

View File

@@ -177,6 +177,8 @@
<Content Include="Assets\Icons\MediaTypeLight.svg" /> <Content Include="Assets\Icons\MediaTypeLight.svg" />
<Content Include="Assets\Icons\QualityDark.svg" /> <Content Include="Assets\Icons\QualityDark.svg" />
<Content Include="Assets\Icons\QualityLight.svg" /> <Content Include="Assets\Icons\QualityLight.svg" />
<Content Include="Assets\Icons\ScheduleDark.svg" />
<Content Include="Assets\Icons\ScheduleLight.svg" />
<Content Include="Assets\Icons\StateCancelledDark.svg" /> <Content Include="Assets\Icons\StateCancelledDark.svg" />
<Content Include="Assets\Icons\StateCancelledLight.svg" /> <Content Include="Assets\Icons\StateCancelledLight.svg" />
<Content Include="Assets\Icons\StateDoneDark.svg" /> <Content Include="Assets\Icons\StateDoneDark.svg" />
@@ -191,10 +193,13 @@
<Content Include="Assets\Icons\StateIdleLight.svg" /> <Content Include="Assets\Icons\StateIdleLight.svg" />
<Content Include="Assets\Icons\StateProcessingDark.svg" /> <Content Include="Assets\Icons\StateProcessingDark.svg" />
<Content Include="Assets\Icons\StateProcessingLight.svg" /> <Content Include="Assets\Icons\StateProcessingLight.svg" />
<Content Include="Assets\Icons\StateScheduledDark.svg" />
<Content Include="Assets\Icons\StateScheduledLight.svg" />
<Content Include="Assets\Icons\StateWaitingDark.svg" /> <Content Include="Assets\Icons\StateWaitingDark.svg" />
<Content Include="Assets\Icons\StateWaitingLight.svg" /> <Content Include="Assets\Icons\StateWaitingLight.svg" />
<Content Include="Assets\Icons\TrimDark.svg" /> <Content Include="Assets\Icons\TrimDark.svg" />
<Content Include="Assets\Icons\TrimLight.svg" /> <Content Include="Assets\Icons\TrimLight.svg" />
<Content Include="Assets\Icons\Twitch.svg" />
<Content Include="Assets\Icons\ViewsDark.svg" /> <Content Include="Assets\Icons\ViewsDark.svg" />
<Content Include="Assets\Icons\ViewsLight.svg" /> <Content Include="Assets\Icons\ViewsLight.svg" />
<Content Include="Assets\Logo\Logo.png" /> <Content Include="Assets\Logo\Logo.png" />
@@ -248,7 +253,6 @@
<Content Include="Assets\Logo\Wide310x150Logo.scale-150.png" /> <Content Include="Assets\Logo\Wide310x150Logo.scale-150.png" />
<Content Include="Assets\Logo\Wide310x150Logo.scale-200.png" /> <Content Include="Assets\Logo\Wide310x150Logo.scale-200.png" />
<Content Include="Assets\Logo\Wide310x150Logo.scale-400.png" /> <Content Include="Assets\Logo\Wide310x150Logo.scale-400.png" />
<Content Include="Assets\Icons\Twitch.png" />
<Content Include="Assets\Images\UnknownThumbnail.png" /> <Content Include="Assets\Images\UnknownThumbnail.png" />
<Content Include="Assets\Sources\Twitch.png" /> <Content Include="Assets\Sources\Twitch.png" />
</ItemGroup> </ItemGroup>

View File

@@ -170,7 +170,7 @@ namespace VDownload.Views.Home
HomeOptionsBarAddVideoButton.IsChecked = false; HomeOptionsBarAddVideoButton.IsChecked = false;
// Create video task // Create video task
HomeTaskPanel taskPanel = new HomeTaskPanel(e.VideoService, e.MediaType, e.Stream, e.TrimStart, e.TrimEnd, e.Filename, e.Extension, e.Location); HomeTaskPanel taskPanel = new HomeTaskPanel(e.VideoService, e.MediaType, e.Stream, e.TrimStart, e.TrimEnd, e.Filename, e.Extension, e.Location, e.Schedule);
taskPanel.TaskRemovingRequested += (s, a) => taskPanel.TaskRemovingRequested += (s, a) =>
{ {

View File

@@ -32,7 +32,7 @@ namespace VDownload.Views.Home
#region CONSTRUCTORS #region CONSTRUCTORS
public HomeTaskPanel(IVideoService videoService, MediaType mediaType, IBaseStream stream, TimeSpan trimStart, TimeSpan trimEnd, string filename, MediaFileExtension extension, StorageFolder location) public HomeTaskPanel(IVideoService videoService, MediaType mediaType, IBaseStream stream, TimeSpan trimStart, TimeSpan trimEnd, string filename, MediaFileExtension extension, StorageFolder location, double schedule)
{ {
this.InitializeComponent(); this.InitializeComponent();
@@ -53,6 +53,7 @@ namespace VDownload.Views.Home
Filename = filename; Filename = filename;
Extension = extension; Extension = extension;
Location = location; Location = location;
Schedule = schedule;
// Set metadata // Set metadata
ThumbnailImage = VideoService.Thumbnail != null ? new BitmapImage { UriSource = VideoService.Thumbnail } : (BitmapImage)ImagesRes["UnknownThumbnailImage"]; ThumbnailImage = VideoService.Thumbnail != null ? new BitmapImage { UriSource = VideoService.Thumbnail } : (BitmapImage)ImagesRes["UnknownThumbnailImage"];
@@ -95,6 +96,7 @@ namespace VDownload.Views.Home
private string Filename { get; set; } private string Filename { get; set; }
private MediaFileExtension Extension { get; set; } private MediaFileExtension Extension { get; set; }
private StorageFolder Location { get; set; } private StorageFolder Location { get; set; }
private double Schedule { get; set; }
// VIDEO PANEL DATA // VIDEO PANEL DATA
private ImageSource ThumbnailImage { get; set; } private ImageSource ThumbnailImage { get; set; }
@@ -297,14 +299,14 @@ namespace VDownload.Views.Home
// START STOP BUTTON CLICKED // START STOP BUTTON CLICKED
private async void HomeTaskPanelStartStopButton_Click(object sender, RoutedEventArgs e) private async void HomeTaskPanelStartStopButton_Click(object sender, RoutedEventArgs e)
{ {
if (TaskStatus == Core.Enums.TaskStatus.InProgress || TaskStatus == Core.Enums.TaskStatus.Waiting) CancellationTokenSource.Cancel(); if (TaskStatus == Core.Enums.TaskStatus.InProgress || TaskStatus == Core.Enums.TaskStatus.Waiting || TaskStatus == Core.Enums.TaskStatus.Scheduled) CancellationTokenSource.Cancel();
else await Start(); else await Start();
} }
// REMOVE BUTTON CLICKED // REMOVE BUTTON CLICKED
private void HomeTaskPanelRemoveButton_Click(object sender, RoutedEventArgs e) private void HomeTaskPanelRemoveButton_Click(object sender, RoutedEventArgs e)
{ {
if (TaskStatus == Core.Enums.TaskStatus.InProgress || TaskStatus == Core.Enums.TaskStatus.Waiting) CancellationTokenSource.Cancel(); if (TaskStatus == Core.Enums.TaskStatus.InProgress || TaskStatus == Core.Enums.TaskStatus.Waiting || TaskStatus == Core.Enums.TaskStatus.Scheduled) CancellationTokenSource.Cancel();
TaskRemovingRequested?.Invoke(this, EventArgs.Empty); TaskRemovingRequested?.Invoke(this, EventArgs.Empty);
} }

View File

@@ -7,6 +7,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ex="using:Microsoft.Toolkit.Uwp.UI" xmlns:ex="using:Microsoft.Toolkit.Uwp.UI"
xmlns:cc="using:VDownload.Controls" xmlns:cc="using:VDownload.Controls"
xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
mc:Ignorable="d" mc:Ignorable="d"
d:DesignHeight="300" d:DesignHeight="300"
d:DesignWidth="400"> d:DesignWidth="400">
@@ -81,6 +82,7 @@
<Setter Target="HomeVideoAddingPanelDMetadataR2.Height" Value="Auto"/> <Setter Target="HomeVideoAddingPanelDMetadataR2.Height" Value="Auto"/>
<Setter Target="HomeVideoAddingPanelDMetadataC1.Width" Value="1*"/> <Setter Target="HomeVideoAddingPanelDMetadataC1.Width" Value="1*"/>
<Setter Target="HomeVideoAddingPanelDMetadataC2.Width" Value="1*"/> <Setter Target="HomeVideoAddingPanelDMetadataC2.Width" Value="1*"/>
<Setter Target="HomeVideoAddingFilenameTextBox.MaxWidth" Value="180"/>
</VisualState.Setters> </VisualState.Setters>
</VisualState> </VisualState>
<VisualState> <VisualState>
@@ -137,6 +139,7 @@
<Setter Target="HomeVideoAddingPanelDMetadataR2.Height" Value="1*"/> <Setter Target="HomeVideoAddingPanelDMetadataR2.Height" Value="1*"/>
<Setter Target="HomeVideoAddingPanelDMetadataC1.Width" Value="Auto"/> <Setter Target="HomeVideoAddingPanelDMetadataC1.Width" Value="Auto"/>
<Setter Target="HomeVideoAddingPanelDMetadataC2.Width" Value="Auto"/> <Setter Target="HomeVideoAddingPanelDMetadataC2.Width" Value="Auto"/>
<Setter Target="HomeVideoAddingFilenameTextBox.MaxWidth" Value="250"/>
</VisualState.Setters> </VisualState.Setters>
</VisualState> </VisualState>
</VisualStateGroup> </VisualStateGroup>
@@ -232,7 +235,7 @@
<ColumnDefinition/> <ColumnDefinition/>
<ColumnDefinition Width="100"/> <ColumnDefinition Width="100"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<TextBox x:Name="HomeVideoAddingFilenameTextBox" Grid.Column="0" HorizontalAlignment="Stretch" MinWidth="150" MaxWidth="300" IsSpellCheckEnabled="False" TextChanged="HomeVideoAddingFilenameTextBox_TextChanged"/> <TextBox x:Name="HomeVideoAddingFilenameTextBox" Grid.Column="0" MaxWidth="300" HorizontalAlignment="Right" IsSpellCheckEnabled="False" TextChanged="HomeVideoAddingFilenameTextBox_TextChanged"/>
<ComboBox x:Name="HomeVideoAddingExtensionComboBox" Grid.Column="1" HorizontalAlignment="Stretch" SelectionChanged="HomeVideoAddingExtensionComboBox_SelectionChanged"/> <ComboBox x:Name="HomeVideoAddingExtensionComboBox" Grid.Column="1" HorizontalAlignment="Stretch" SelectionChanged="HomeVideoAddingExtensionComboBox_SelectionChanged"/>
</Grid> </Grid>
</cc:SettingControl.SettingContent> </cc:SettingControl.SettingContent>
@@ -243,6 +246,14 @@
</cc:SettingControl.SettingContent> </cc:SettingControl.SettingContent>
</cc:SettingControl> </cc:SettingControl>
</StackPanel> </StackPanel>
<StackPanel Spacing="10">
<TextBlock x:Uid="HomeVideoAddingTaskOptionsHeaderTextBlock" FontWeight="SemiBold"/>
<cc:SettingControl x:Uid="HomeVideoAddingScheduleSettingControl" Icon="{ThemeResource ScheduleIcon}">
<cc:SettingControl.SettingContent>
<muxc:NumberBox x:Name="HomeVideoAddingScheduleNumberBox" MaxWidth="100" Value="0" Minimum="0" SpinButtonPlacementMode="Compact" ValueChanged="HomeVideoAddingScheduleNumberBox_ValueChanged"/>
</cc:SettingControl.SettingContent>
</cc:SettingControl>
</StackPanel>
</StackPanel> </StackPanel>
</ScrollViewer> </ScrollViewer>
</Grid> </Grid>

View File

@@ -7,7 +7,6 @@ using System.Threading.Tasks;
using VDownload.Core.Enums; using VDownload.Core.Enums;
using VDownload.Core.EventArgs; using VDownload.Core.EventArgs;
using VDownload.Core.Interfaces; using VDownload.Core.Interfaces;
using VDownload.Core.Objects;
using VDownload.Core.Services; using VDownload.Core.Services;
using Windows.ApplicationModel.Resources; using Windows.ApplicationModel.Resources;
using Windows.Storage; using Windows.Storage;
@@ -112,6 +111,9 @@ namespace VDownload.Views.Home
Location = null; Location = null;
HomeVideoAddingLocationSettingControl.Description = $@"{UserDataPaths.GetDefault().Downloads}\VDownload"; HomeVideoAddingLocationSettingControl.Description = $@"{UserDataPaths.GetDefault().Downloads}\VDownload";
} }
// Set minutes to start
Schedule = 0;
} }
#endregion #endregion
@@ -140,6 +142,7 @@ namespace VDownload.Views.Home
private string Filename { get; set; } private string Filename { get; set; }
private MediaFileExtension Extension { get; set; } private MediaFileExtension Extension { get; set; }
private StorageFolder Location { get; set; } private StorageFolder Location { get; set; }
private double Schedule { get; set; }
#endregion #endregion
@@ -256,6 +259,12 @@ namespace VDownload.Views.Home
Extension = (MediaFileExtension)HomeVideoAddingExtensionComboBox.SelectedIndex + (MediaType == MediaType.OnlyAudio ? 3 : 0); Extension = (MediaFileExtension)HomeVideoAddingExtensionComboBox.SelectedIndex + (MediaType == MediaType.OnlyAudio ? 3 : 0);
} }
// SCHEDULE NUMBERBOX VALUE CHANGED
private void HomeVideoAddingScheduleNumberBox_ValueChanged(Microsoft.UI.Xaml.Controls.NumberBox sender, Microsoft.UI.Xaml.Controls.NumberBoxValueChangedEventArgs args)
{
Schedule = HomeVideoAddingScheduleNumberBox.Value;
}
// LOCATION BROWSE BUTTON CLICKED // LOCATION BROWSE BUTTON CLICKED
private async void HomeVideoAddingLocationBrowseButton_Click(object sender, RoutedEventArgs e) private async void HomeVideoAddingLocationBrowseButton_Click(object sender, RoutedEventArgs e)
{ {
@@ -300,6 +309,7 @@ namespace VDownload.Views.Home
Filename = Filename, Filename = Filename,
Extension = Extension, Extension = Extension,
Location = Location, Location = Location,
Schedule = Schedule,
}; };
VideoAddRequest?.Invoke(this, args); VideoAddRequest?.Invoke(this, args);
} }