Skip to content

Commit 4ed7434

Browse files
committed
Patch release [v4.3.1.0]
- Greatly improved the bootstrapper, it now has a nice GUI that shows progress - Improved the update checker - Added some config safety features, this will prevent the config manager from breaking if the user inputs a '¶' or '\n' (these two characters are used as delimiters in the config manager)
1 parent 56e6aa0 commit 4ed7434

30 files changed

Lines changed: 5286 additions & 75 deletions
93.6 KB
Loading
38.1 KB
Loading
40 KB
Loading

changelog.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
~
2-
- Removed "by o7q" on the banners and logos (didn't like having my name on it because yt-dlp did most of the heavy lifting, and I didn't make yt-dlp)
1+
~ v4.3.1.0
2+
- Greatly improved the bootstrapper, it now has a nice GUI that shows progress
3+
- Improved the update checker
4+
- Added some config safety features, this will prevent the config manager from breaking if the user inputs a '¶' or '\n' (these two characters are used as delimiters in the config manager)
35

46
~ v4.3.0.0
57
- Improved the progress bar for the queue system

src/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Build folder
2+
BUILD

src/MediaDownloader/Clean.bat

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,4 @@
22
rmdir ".vs" /s /q 2> nul
33
rmdir "MediaDownloader\.vs" /s /q 2> nul
44
rmdir "MediaDownloader\bin" /s /q 2> nul
5-
rmdir "MediaDownloader\obj" /s /q 2> nul
6-
rmdir "MediaDownloader\Build" /s /q 2> nul
7-
mkdir "MediaDownloader\Build/MediaDownloader" 2> nul
5+
rmdir "MediaDownloader\obj" /s /q 2> nul

src/MediaDownloader/MediaDownloader/Init.cs

Lines changed: 20 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
using System.IO;
33
using System.Windows.Forms;
44
using System.Diagnostics;
5+
56
using MediaDownloader.Tools.CustomMessageBox;
7+
using MediaDownloader.Setup.BootstrapForm;
68
using static MediaDownloader.Global;
7-
using static MediaDownloader.Setup.Bootstrapper;
89
using static MediaDownloader.Tools.FolderCompressor;
910
using static MediaDownloader.Updater.UpdaterSetup;
1011
using static MediaDownloader.Data.Config.ConfigManager;
@@ -27,43 +28,39 @@ static void Main()
2728
return;
2829
}
2930

30-
// detect if redists exist
31-
bool ytdlpCheck = true;
32-
bool ffmpegCheck = true;
33-
string redistText = "";
31+
bool ytdlpMissing = false;
32+
bool ffmpegMissing = false;
33+
3434
if (!File.Exists("MediaDownloader\\redist\\yt-dlp\\yt-dlp.exe"))
35+
ytdlpMissing = true;
36+
37+
if (
38+
!File.Exists("MediaDownloader\\redist\\ffmpeg\\ffmpeg.exe") ||
39+
!File.Exists("MediaDownloader\\redist\\ffmpeg\\ffprobe.exe")
40+
)
3541
{
36-
ytdlpCheck = false;
37-
redistText += "\n- yt-dlp";
38-
}
39-
if (!File.Exists("MediaDownloader\\redist\\ffmpeg\\ffmpeg.exe") || !File.Exists("MediaDownloader\\redist\\ffmpeg\\ffprobe.exe"))
40-
{
41-
ffmpegCheck = false;
42-
redistText += "\n- ffmpeg";
42+
ffmpegMissing = true;
4343
}
4444

45-
if (!ytdlpCheck || !ffmpegCheck)
45+
if (ytdlpMissing || ffmpegMissing)
4646
{
47-
CustomMessageBox customMessageBox = new CustomMessageBox("MediaDownloader will download the following redist files:" + redistText + "\n\nPress OK to continue\nPress CLOSE to cancel", "OK", true);
48-
customMessageBox.ShowDialog();
47+
BootstrapForm bootstrapForm = new BootstrapForm(ytdlpMissing, ffmpegMissing);
48+
bootstrapForm.ShowDialog();
4949

50-
if (customMessageBox.Result == DialogResult.Cancel)
51-
return;
50+
if (bootstrapForm.Result == DialogResult.Cancel)
51+
{
52+
Environment.Exit(0);
53+
}
5254
}
5355

54-
if (!ytdlpCheck)
55-
InstallYtdlp();
56-
if (!ffmpegCheck)
57-
InstallFFmpeg();
58-
5956
InstallUpdater();
6057

6158
if (File.Exists("MediaDownloader\\config\\config.cfg"))
6259
CONFIG = ReadConfig("MediaDownloader\\config\\config.cfg");
6360
else
6461
{
6562
CONFIG.NOTIFICATIONS_ENABLE = true;
66-
CONFIG.DATA_ZIPPING_ENABLE = true;
63+
CONFIG.DATA_ZIPPING_ENABLE = false;
6764
CONFIG.TRUSTED_URLS = "youtube.com,youtu.be,twitter.com,instagram.com";
6865
}
6966

src/MediaDownloader/MediaDownloader/MainMenu.cs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
using System.Drawing;
55
using System.Threading.Tasks;
66
using System.Diagnostics;
7+
78
using MediaDownloader.Tools.CustomMessageBox;
89
using static MediaDownloader.Global;
910
using static MediaDownloader.Data.Config.ConfigManager;
@@ -80,7 +81,7 @@ private void Program_Load(object sender, EventArgs e)
8081
var newVersionAvailable = CheckForNewUpdate(VERSION_INTERNAL);
8182
if (newVersionAvailable.Item1 && CONFIG.NOTIFICATIONS_ENABLE && !VERSION_INTERNAL.Contains("dev"))
8283
{
83-
VERSION_REMOTE = newVersionAvailable.Item2;
84+
VERSION_INTERNAL_REMOTE = newVersionAvailable.Item2;
8485
NotificationPictureBox.Visible = true;
8586
NotificationLabel.Visible = true;
8687
}
@@ -112,19 +113,19 @@ private void Program_Load(object sender, EventArgs e)
112113
"OutputTimeframeTrimFromStart", "Trim from the start",
113114
"OutputTimeframeTrimToEnd", "Trim to the end",
114115

115-
"DownloadButton", "Download from the URL using the configured options",
116+
"DownloadButton", "Download from the URL using the configured options (ctrl or shift click if it gets stuck)",
116117

117118
"OutputChangeLocationButton", "Change the folder location for download",
118119
"OutputOpenLocationButton", "Open the selected download location in the file explorer",
119120
"OutputClearLocationButton", "Reset the selected download location",
120121
"OutputLocationTextBox", "Currently selected download location",
121122

122123
"OutputResizeCheckBox", "Enable resizing for video",
123-
"OutputResizeWidthTextBox", "Width for video",
124-
"OutputResizeHeightTextBox", "Height for video",
124+
"OutputResizeWidthTextBox", "Width for video (this is fed into FFmpeg, meaning you can use math expressions - Examples: \"1920/2\" | \"1280*4\"",
125+
"OutputResizeHeightTextBox", "Height for video (this is fed into FFmpeg, meaning you can use math expressions - Examples: \"1080/2\" | \"720*4\"",
125126

126127
"OutputFramerateCheckBox", "Enable framerate change for video",
127-
"OutputFramerateTextBox", "Framerate for video",
128+
"OutputFramerateTextBox", "Framerate for video (this is fed into FFmpeg, meaning you can use math expressions - Examples: \"60/2\" | \"30*4\"",
128129

129130
"OutputVideoBitrateTextBox", "Bitrate for video - Examples: \"100M\" | \"900K\" (M = MB/s, K = KB/s)",
130131
"OutputAudioBitrateTextBox", "Bitrate for audio - Examples: \"320K\" | \"10K\" (M = MB/s, K = KB/s)",
@@ -1052,7 +1053,7 @@ private void RunUpdateDialog()
10521053
{
10531054
string changelog = ReadRemoteResource("https://raw.githubusercontent.com/o7q/MediaDownloader/main/remote/changelog");
10541055

1055-
CustomMessageBox customMessageBox = new CustomMessageBox("A newer version of MediaDownloader is available! (" + VERSION_REMOTE + ")\n\nChangelog:\n" + changelog + "\n\nWould you like to download/install it now?\n\nPress OK to continue\nPress CLOSE to cancel\n\n(you can disable this notification in the config)", "OK", true);
1056+
CustomMessageBox customMessageBox = new CustomMessageBox("A newer version of MediaDownloader is available! (" + VERSION_INTERNAL_REMOTE + ")\n\nChangelog:\n" + changelog + "\n\nWould you like to download/install it now?\n\nPress OK to continue\nPress CLOSE to cancel\n\n(you can disable this notification in the config)", "OK", true);
10561057
customMessageBox.ShowDialog();
10571058

10581059
if (customMessageBox.Result == DialogResult.OK)

src/MediaDownloader/MediaDownloader/MediaDownloader.csproj

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<DebugSymbols>true</DebugSymbols>
1919
<DebugType>full</DebugType>
2020
<Optimize>false</Optimize>
21-
<OutputPath>Build\MediaDownloader\</OutputPath>
21+
<OutputPath>..\..\BUILD\MediaDownloader\</OutputPath>
2222
<DefineConstants>DEBUG;TRACE</DefineConstants>
2323
<ErrorReport>prompt</ErrorReport>
2424
<WarningLevel>4</WarningLevel>
@@ -30,7 +30,7 @@
3030
<PlatformTarget>AnyCPU</PlatformTarget>
3131
<DebugType>none</DebugType>
3232
<Optimize>true</Optimize>
33-
<OutputPath>Build\MediaDownloader\</OutputPath>
33+
<OutputPath>..\..\BUILD\MediaDownloader\</OutputPath>
3434
<DefineConstants>TRACE</DefineConstants>
3535
<ErrorReport>prompt</ErrorReport>
3636
<WarningLevel>4</WarningLevel>
@@ -58,6 +58,12 @@
5858
<Compile Include="Scripts\Data\QueueItem\QueueItemStructure.cs" />
5959
<Compile Include="Scripts\Media\Downloaders\BulkQueuer.cs" />
6060
<Compile Include="Scripts\Media\Downloaders\Queuer.cs" />
61+
<Compile Include="Scripts\Setup\BootstrapForm\BootstrapForm.cs">
62+
<SubType>Form</SubType>
63+
</Compile>
64+
<Compile Include="Scripts\Setup\BootstrapForm\BootstrapForm.Designer.cs">
65+
<DependentUpon>BootstrapForm.cs</DependentUpon>
66+
</Compile>
6167
<Compile Include="Scripts\Tools\FolderCompressor.cs" />
6268
<Compile Include="Scripts\Data\Config\ConfigManager.cs" />
6369
<Compile Include="Scripts\Media\Converters\Converter.cs" />
@@ -81,6 +87,7 @@
8187
<Compile Include="Init.cs" />
8288
<Compile Include="Properties\AssemblyInfo.cs" />
8389
<Compile Include="Scripts\Tools\Shell.cs" />
90+
<Compile Include="Scripts\Tools\Strings.cs" />
8491
<Compile Include="Updater\UpdateChecker.cs" />
8592
<Compile Include="Updater\ResourceReader.cs" />
8693
<Compile Include="Updater\UpdaterSetup.cs" />
@@ -92,6 +99,9 @@
9299
<SubType>Designer</SubType>
93100
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
94101
</EmbeddedResource>
102+
<EmbeddedResource Include="Scripts\Setup\BootstrapForm\BootstrapForm.resx">
103+
<DependentUpon>BootstrapForm.cs</DependentUpon>
104+
</EmbeddedResource>
95105
<EmbeddedResource Include="Scripts\Tools\CustomMessageBox\CustomMessageBox.resx">
96106
<DependentUpon>CustomMessageBox.cs</DependentUpon>
97107
</EmbeddedResource>
@@ -123,6 +133,9 @@
123133
</ItemGroup>
124134
<ItemGroup>
125135
<Content Include="logo.ico" />
136+
<None Include="Resources\loading_icon.gif" />
137+
<None Include="Resources\checkmark.png" />
138+
<None Include="Resources\crossmark.png" />
126139
<None Include="Resources\banner_hq.png" />
127140
<None Include="Resources\settings.png" />
128141
<None Include="Resources\notification.png" />

src/MediaDownloader/MediaDownloader/Properties/Resources.Designer.cs

Lines changed: 30 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)