diff --git a/README.md b/README.md
index c9b3a05..8840318 100644
--- a/README.md
+++ b/README.md
@@ -10,7 +10,7 @@ VDownload is universal video downloader written in .NET/C# and Universal Windows
## Download and installation
- Microsoft Store
-- GitHub Release
+- GitHub Releases
@@ -29,6 +29,7 @@ VDownload is universal video downloader written in .NET/C# and Universal Windows
- Video downloading
- Audio-only, video-only and audio-video downloading
- Time trimming - download only the fragment you need
+- Task scheduling - start downloading after a certain amount of time
- Playlist downloading
- Playlist filtering - download only the videos you need
- 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)
- **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
+- **Translate the application into a language you know**
#### App development status
diff --git a/VDownload.Core/Enums/TaskStatus.cs b/VDownload.Core/Enums/TaskStatus.cs
index f908ef6..419a012 100644
--- a/VDownload.Core/Enums/TaskStatus.cs
+++ b/VDownload.Core/Enums/TaskStatus.cs
@@ -3,6 +3,7 @@
public enum TaskStatus
{
Idle,
+ Scheduled,
Waiting,
InProgress
}
diff --git a/VDownload.Core/EventArgs/VideoAddEventArgs.cs b/VDownload.Core/EventArgs/VideoAddEventArgs.cs
index 3e34a83..55e5e9a 100644
--- a/VDownload.Core/EventArgs/VideoAddEventArgs.cs
+++ b/VDownload.Core/EventArgs/VideoAddEventArgs.cs
@@ -16,5 +16,6 @@ namespace VDownload.Core.EventArgs
public string Filename { get; set; }
public MediaFileExtension Extension { get; set; }
public StorageFolder Location { get; set; }
+ public double Schedule { get; set; }
}
}
diff --git a/VDownload/Assets/Icons/ScheduleDark.svg b/VDownload/Assets/Icons/ScheduleDark.svg
new file mode 100644
index 0000000..b7cb061
--- /dev/null
+++ b/VDownload/Assets/Icons/ScheduleDark.svg
@@ -0,0 +1,3 @@
+
\ No newline at end of file
diff --git a/VDownload/Assets/Icons/ScheduleLight.svg b/VDownload/Assets/Icons/ScheduleLight.svg
new file mode 100644
index 0000000..8c368ba
--- /dev/null
+++ b/VDownload/Assets/Icons/ScheduleLight.svg
@@ -0,0 +1,3 @@
+
\ No newline at end of file
diff --git a/VDownload/Assets/Icons/StateScheduledDark.svg b/VDownload/Assets/Icons/StateScheduledDark.svg
new file mode 100644
index 0000000..f3479a8
--- /dev/null
+++ b/VDownload/Assets/Icons/StateScheduledDark.svg
@@ -0,0 +1,3 @@
+
\ No newline at end of file
diff --git a/VDownload/Assets/Icons/StateScheduledLight.svg b/VDownload/Assets/Icons/StateScheduledLight.svg
new file mode 100644
index 0000000..8d28925
--- /dev/null
+++ b/VDownload/Assets/Icons/StateScheduledLight.svg
@@ -0,0 +1,3 @@
+
\ No newline at end of file
diff --git a/VDownload/Assets/Icons/Twitch.png b/VDownload/Assets/Icons/Twitch.png
deleted file mode 100644
index 9989457..0000000
Binary files a/VDownload/Assets/Icons/Twitch.png and /dev/null differ
diff --git a/VDownload/Assets/Icons/Twitch.svg b/VDownload/Assets/Icons/Twitch.svg
new file mode 100644
index 0000000..93bd672
--- /dev/null
+++ b/VDownload/Assets/Icons/Twitch.svg
@@ -0,0 +1,12 @@
+
\ No newline at end of file
diff --git a/VDownload/Assets/Sources/Twitch.png b/VDownload/Assets/Sources/Twitch.png
index 9989457..e5fa3b3 100644
Binary files a/VDownload/Assets/Sources/Twitch.png and b/VDownload/Assets/Sources/Twitch.png differ
diff --git a/VDownload/Controls/SettingControl.xaml b/VDownload/Controls/SettingControl.xaml
index ee8deae..4d52910 100644
--- a/VDownload/Controls/SettingControl.xaml
+++ b/VDownload/Controls/SettingControl.xaml
@@ -29,11 +29,11 @@
-
-
+
+
diff --git a/VDownload/Resources/Icons.xaml b/VDownload/Resources/Icons.xaml
index 4bb907e..a18f053 100644
--- a/VDownload/Resources/Icons.xaml
+++ b/VDownload/Resources/Icons.xaml
@@ -1,9 +1,6 @@
-
-
-
@@ -15,6 +12,7 @@
+
@@ -23,6 +21,7 @@
+
@@ -34,6 +33,7 @@
+
@@ -42,14 +42,9 @@
+
-
-
-
-
-
-
-
+
diff --git a/VDownload/Strings/en-US/Resources.resw b/VDownload/Strings/en-US/Resources.resw
index 62652c4..2126177 100644
--- a/VDownload/Strings/en-US/Resources.resw
+++ b/VDownload/Strings/en-US/Resources.resw
@@ -241,6 +241,15 @@ The number in the numberbox indicades how many videos will be got from playlist.
Quality
+
+ Number of minutes to start the task (after clicking downloading button).
+
+
+ Schedule
+
+
+ Task options
+
Trim
diff --git a/VDownload/VDownload.csproj b/VDownload/VDownload.csproj
index 745fb9b..6a48a5f 100644
--- a/VDownload/VDownload.csproj
+++ b/VDownload/VDownload.csproj
@@ -177,6 +177,8 @@
+
+
@@ -191,10 +193,13 @@
+
+
+
@@ -248,7 +253,6 @@
-
diff --git a/VDownload/Views/Home/HomeMain.xaml.cs b/VDownload/Views/Home/HomeMain.xaml.cs
index ae71e79..4fdbd03 100644
--- a/VDownload/Views/Home/HomeMain.xaml.cs
+++ b/VDownload/Views/Home/HomeMain.xaml.cs
@@ -170,7 +170,7 @@ namespace VDownload.Views.Home
HomeOptionsBarAddVideoButton.IsChecked = false;
// 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) =>
{
diff --git a/VDownload/Views/Home/HomeTaskPanel.xaml.cs b/VDownload/Views/Home/HomeTaskPanel.xaml.cs
index d69c4a7..d086272 100644
--- a/VDownload/Views/Home/HomeTaskPanel.xaml.cs
+++ b/VDownload/Views/Home/HomeTaskPanel.xaml.cs
@@ -32,7 +32,7 @@ namespace VDownload.Views.Home
#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();
@@ -53,6 +53,7 @@ namespace VDownload.Views.Home
Filename = filename;
Extension = extension;
Location = location;
+ Schedule = schedule;
// Set metadata
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 MediaFileExtension Extension { get; set; }
private StorageFolder Location { get; set; }
+ private double Schedule { get; set; }
// VIDEO PANEL DATA
private ImageSource ThumbnailImage { get; set; }
@@ -297,14 +299,14 @@ namespace VDownload.Views.Home
// START STOP BUTTON CLICKED
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();
}
// REMOVE BUTTON CLICKED
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);
}
diff --git a/VDownload/Views/Home/HomeVideoAddingPanel.xaml b/VDownload/Views/Home/HomeVideoAddingPanel.xaml
index 27315af..a99f53a 100644
--- a/VDownload/Views/Home/HomeVideoAddingPanel.xaml
+++ b/VDownload/Views/Home/HomeVideoAddingPanel.xaml
@@ -7,6 +7,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ex="using:Microsoft.Toolkit.Uwp.UI"
xmlns:cc="using:VDownload.Controls"
+ xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
mc:Ignorable="d"
d:DesignHeight="300"
d:DesignWidth="400">
@@ -81,6 +82,7 @@
+
@@ -137,6 +139,7 @@
+
@@ -232,7 +235,7 @@
-
+
@@ -243,6 +246,14 @@
+
+
+
+
+
+
+
+
diff --git a/VDownload/Views/Home/HomeVideoAddingPanel.xaml.cs b/VDownload/Views/Home/HomeVideoAddingPanel.xaml.cs
index 47a5c21..e6b28f4 100644
--- a/VDownload/Views/Home/HomeVideoAddingPanel.xaml.cs
+++ b/VDownload/Views/Home/HomeVideoAddingPanel.xaml.cs
@@ -7,7 +7,6 @@ using System.Threading.Tasks;
using VDownload.Core.Enums;
using VDownload.Core.EventArgs;
using VDownload.Core.Interfaces;
-using VDownload.Core.Objects;
using VDownload.Core.Services;
using Windows.ApplicationModel.Resources;
using Windows.Storage;
@@ -112,6 +111,9 @@ namespace VDownload.Views.Home
Location = null;
HomeVideoAddingLocationSettingControl.Description = $@"{UserDataPaths.GetDefault().Downloads}\VDownload";
}
+
+ // Set minutes to start
+ Schedule = 0;
}
#endregion
@@ -140,6 +142,7 @@ namespace VDownload.Views.Home
private string Filename { get; set; }
private MediaFileExtension Extension { get; set; }
private StorageFolder Location { get; set; }
+ private double Schedule { get; set; }
#endregion
@@ -256,6 +259,12 @@ namespace VDownload.Views.Home
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
private async void HomeVideoAddingLocationBrowseButton_Click(object sender, RoutedEventArgs e)
{
@@ -300,6 +309,7 @@ namespace VDownload.Views.Home
Filename = Filename,
Extension = Extension,
Location = Location,
+ Schedule = Schedule,
};
VideoAddRequest?.Invoke(this, args);
}