From d6bb5f6549f71c89faf4342dabeb2dfd2bce1438 Mon Sep 17 00:00:00 2001 From: o7q Date: Sat, 30 Sep 2023 21:35:40 -0500 Subject: [PATCH] Minor Release [v4.3.0.0] - Improved the progress bar for the queue system - Added a config option to allow only specified urls to be downloaded from - Double-clicking the url textbox now navigates to the current url in a browser - Fixed minor bugs - MediaDownloader Updater v1.1.0 - Made it run inside a shell window instead of a powershell windows - Made it work as a standalone updater --- assets_raw/graphics/button/settings.png | Bin 0 -> 1420 bytes changelog.txt | 9 +- src/MediaDownloader/MediaDownloader/Init.cs | 3 +- .../MediaDownloader/MainMenu.Designer.cs | 166 ++++++++++++------ .../MediaDownloader/MainMenu.cs | 73 ++++++-- .../MediaDownloader/MediaDownloader.csproj | 1 + .../Properties/Resources.Designer.cs | 10 ++ .../MediaDownloader/Properties/Resources.resx | 13 +- .../MediaDownloader/Resources/settings.png | Bin 0 -> 1420 bytes .../Scripts/Data/Config/ConfigManager.cs | 12 +- .../Scripts/Data/Config/ConfigStructure.cs | 12 +- .../Scripts/Media/Downloaders/BulkQueuer.cs | 43 ++++- .../Scripts/Media/Downloaders/Queuer.cs | 2 + .../CustomMessageBox.Designer.cs | 17 ++ to-do.txt | 3 +- 15 files changed, 267 insertions(+), 97 deletions(-) create mode 100644 assets_raw/graphics/button/settings.png create mode 100644 src/MediaDownloader/MediaDownloader/Resources/settings.png diff --git a/assets_raw/graphics/button/settings.png b/assets_raw/graphics/button/settings.png new file mode 100644 index 0000000000000000000000000000000000000000..b8dc0546c1f201c0dad6024c394f0a7a6f20a792 GIT binary patch literal 1420 zcmV;71#|j|P)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!2kdb!2!6DYwZ941tCd9K~#8N?b|Vk zD@7Ow@XKyi0-l9pVWonVyuwm=l~^g**w`tk*d&{Pg|%XN#bL6W69k`yHm?%|tt>1= zYk62%C>9nX3W^ZjY@B(1ffI6GcJqDTWWM?T;K(;u-0aN!XExbzCjbBd0000000000 z0001B(STk}J3l{vZZsNwLd|QnZTn$amM>A$G;;x%&*wLbqWF@UY&M(C-;>GY9%`Cl zDgbp|f1PF7lhhP39*<4USw^oWNH4xcrUC%nApjj+TwJ_Dr3q#NP*v4iR7!iFUQI9) zfIQFNq!K#7Eg*3SK;jU9#32AZxK9EbDx+s20G1X+8%}`4ApnU}4}d?e{m*i_e4Boi zG&dK+?VQlBRH=Tm^*@6gj>qFQ)tyvTbtljB8`M;F$Tx#m&4u>2jcT3koA9m^5NhXm zQrD^(0+o*XF4A=q5pwajq^?mb1mc~zd;RBw!Qg3X_I7zfj$z?<$lNvFy{^S#@!fDZ zeC+OT51h#?K;jU9#3gkL*yq@^G?slN5r96EWpPZqu>2A47$=Nl zlB|wvi|svtzo@otKcHrCT$98(*&Mj9M`UoJca6lNg&vdJTf#%|SY60+k2&jyj)FNpwzNZ=h zPhybk_4)}ap(FJGNSIEi-%uH?5WC+q5di4VL;#k{a@2HsdiocYtU{auY5`a*7B{ji6ZN09u2|^ZXeqMQM#ks~^z-XeQay?oXP=c*Fu=Z85wMWAc5vpPZWPL;?_U z@um6>IVPuZpP+uBnicEgM|Y7wyLb8zQZp#dN2`Gs|3A1N8JnD>Esn{uI<762KXi7wozTIEElxca2q5eV^y~Bh=iR*6FFz ziMQ`!bsc!f5J+9C*5Z3=9eGzxz##*k&*!&_qIj8_st&nsiMi-QwKLD%AAfT9NB^C{ zqi(Q2{QKL(gg6B_7ixR`+Kcb0cPJtD0EC1GL5VXFfX!ypQVAWI2*6}A5&P#!>u?L` z!OH#LLjV$o03;3pNSv7fG)?n7mC%8i0L*5ykExXQD!rP3TR=zd6TmGhO+Ww=XDR?~ z+rCRB?8(dnjmspy9CG3MqAbg&sA-1D0PNB+6gS= 0) + containsTrustedUrl = true; + } + } + + if (IS_DOWNLOADING || currentQueueItem.URL == "" || currentQueueItem.URL == null || !containsTrustedUrl) return; Task.Run(() => StartDownload(currentQueueItem, OutputNameTextBox, DownloadButton, DownloadAllButton)); @@ -188,10 +200,15 @@ private void DownloadButton_Click(object sender, EventArgs e) private void DownloadAllButton_Click(object sender, EventArgs e) { - if (IS_DOWNLOADING) + if (ModifierKeys == Keys.Control || ModifierKeys == Keys.Shift) + { + IS_DOWNLOADING = false; + ChangeDownloadButtonColors(false, DownloadButton, DownloadAllButton); return; + } - QueueProgressBar.Value = 0; + if (IS_DOWNLOADING || QueueListBox.Items.Count == 0) + return; string[] queueList = new string[QueueListBox.Items.Count]; int queueIndex = 0; @@ -201,7 +218,7 @@ private void DownloadAllButton_Click(object sender, EventArgs e) queueIndex++; } - Task.Run(() => StartDownloadQueue(queueList, DownloadButton, DownloadAllButton, QueueProgressBar)); + Task.Run(() => StartDownloadQueue(queueList, DownloadButton, DownloadAllButton, QueueProgressBarPanel, QueueProgressLabel)); } private void QueueAddButton_Click(object sender, EventArgs e) @@ -855,16 +872,23 @@ private void ExpandMenu() MenuExpandButton.Size = new Size(29, 102); MenuExpandButton.Text = "<<"; + QueueLabel.Visible = true; + QueueDecorationPanel.Visible = true; + QueueListBox.Visible = true; - QueueProgressBar.Visible = true; DownloadAllButton.Visible = true; + QueueProgressLabel.Visible = true; + QueueProgressBarPanel.Visible = true; + QueueProgressPanel.Visible = true; + QueueProgressDecorationPanel.Visible = true; + QueueAddButton.Visible = true; QueueRemoveButton.Visible = true; - QueueLabel.Visible = true; - QueueDecorationPanel.Visible = true; + HistoryLabel.Visible = true; + HistoryDecorationPanel.Visible = true; HistoryListBox.Visible = true; @@ -876,9 +900,6 @@ private void ExpandMenu() HistoryRefreshButton.Visible = true; HistoryRemoveButton.Visible = true; - HistoryLabel.Visible = true; - HistoryDecorationPanel.Visible = true; - Size = new Size(691, 244); TitlebarPanel.Size = new Size(691, 35); @@ -897,16 +918,23 @@ private void CollapseMenu() MenuExpandButton.Size = new Size(29, 207); MenuExpandButton.Text = ">>"; - QueueListBox.Visible = false; - QueueProgressBar.Visible = false; + QueueLabel.Visible = false; + QueueDecorationPanel.Visible = false; + + QueueListBox.Visible = true; DownloadAllButton.Visible = false; + QueueProgressLabel.Visible = false; + QueueProgressBarPanel.Visible = false; + QueueProgressPanel.Visible = false; + QueueProgressDecorationPanel.Visible = false; + QueueAddButton.Visible = false; QueueRemoveButton.Visible = false; - QueueLabel.Visible = false; - QueueDecorationPanel.Visible = false; + HistoryLabel.Visible = false; + HistoryDecorationPanel.Visible = false; HistoryListBox.Visible = false; @@ -918,9 +946,6 @@ private void CollapseMenu() HistoryRefreshButton.Visible = false; HistoryRemoveButton.Visible = false; - HistoryLabel.Visible = false; - HistoryDecorationPanel.Visible = false; - Size = new Size(408, 244); TitlebarPanel.Size = new Size(408, 35); @@ -1014,6 +1039,16 @@ private void VersionLabel_MouseDown(object sender, MouseEventArgs e) } private void NotificationPictureBox_Click(object sender, EventArgs e) + { + RunUpdateDialog(); + } + + private void NotificationLabel_Click(object sender, EventArgs e) + { + RunUpdateDialog(); + } + + private void RunUpdateDialog() { string changelog = ReadRemoteResource("https://raw.githubusercontent.com/o7q/MediaDownloader/main/remote/changelog"); diff --git a/src/MediaDownloader/MediaDownloader/MediaDownloader.csproj b/src/MediaDownloader/MediaDownloader/MediaDownloader.csproj index 8b130f2..de91e9e 100644 --- a/src/MediaDownloader/MediaDownloader/MediaDownloader.csproj +++ b/src/MediaDownloader/MediaDownloader/MediaDownloader.csproj @@ -123,6 +123,7 @@ + diff --git a/src/MediaDownloader/MediaDownloader/Properties/Resources.Designer.cs b/src/MediaDownloader/MediaDownloader/Properties/Resources.Designer.cs index bfa00b9..2bcbb5a 100644 --- a/src/MediaDownloader/MediaDownloader/Properties/Resources.Designer.cs +++ b/src/MediaDownloader/MediaDownloader/Properties/Resources.Designer.cs @@ -100,6 +100,16 @@ internal static System.Drawing.Bitmap notification { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap settings { + get { + object obj = ResourceManager.GetObject("settings", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// diff --git a/src/MediaDownloader/MediaDownloader/Properties/Resources.resx b/src/MediaDownloader/MediaDownloader/Properties/Resources.resx index ad358f8..a01886b 100644 --- a/src/MediaDownloader/MediaDownloader/Properties/Resources.resx +++ b/src/MediaDownloader/MediaDownloader/Properties/Resources.resx @@ -121,16 +121,19 @@ ..\Resources\background.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\banner_hq.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\folder.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\x.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\Resources\notification.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\banner_hq.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\settings.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/src/MediaDownloader/MediaDownloader/Resources/settings.png b/src/MediaDownloader/MediaDownloader/Resources/settings.png new file mode 100644 index 0000000000000000000000000000000000000000..b8dc0546c1f201c0dad6024c394f0a7a6f20a792 GIT binary patch literal 1420 zcmV;71#|j|P)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!2kdb!2!6DYwZ941tCd9K~#8N?b|Vk zD@7Ow@XKyi0-l9pVWonVyuwm=l~^g**w`tk*d&{Pg|%XN#bL6W69k`yH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