diff --git a/changelog.txt b/changelog.txt
index 82767df..4b1d4c0 100644
--- a/changelog.txt
+++ b/changelog.txt
@@ -1,3 +1,7 @@
+~ v3.8.3.0
+- Improved the open path button, it will now highlight the latest download
+- Update to yt-dlp 2023.01.06
+
~ v3.8.2.0
- Fix versioning typo
diff --git a/src/MediaDownloader/MediaDownloader.csproj b/src/MediaDownloader/MediaDownloader.csproj
index 0414451..f320310 100644
--- a/src/MediaDownloader/MediaDownloader.csproj
+++ b/src/MediaDownloader/MediaDownloader.csproj
@@ -18,7 +18,7 @@
true
full
false
- ..\..\..\PackagedRelease\MediaDownloader\
+ build\
DEBUG;TRACE
prompt
4
diff --git a/src/MediaDownloader/clean.bat b/src/MediaDownloader/clean.bat
index f7eba6f..2fd532e 100644
--- a/src/MediaDownloader/clean.bat
+++ b/src/MediaDownloader/clean.bat
@@ -1,4 +1,6 @@
@echo off
rmdir ".vs" /s /q 2> nul
rmdir "bin" /s /q 2> nul
-rmdir "obj" /s /q 2> nul
\ No newline at end of file
+rmdir "obj" /s /q 2> nul
+rmdir "build" /s /q 2> nul
+mkdir "build" 2> nul
\ No newline at end of file
diff --git a/src/MediaDownloader/program.Designer.cs b/src/MediaDownloader/program.Designer.cs
index 9f0627e..68bd569 100644
--- a/src/MediaDownloader/program.Designer.cs
+++ b/src/MediaDownloader/program.Designer.cs
@@ -132,7 +132,7 @@ private void InitializeComponent()
this.versionLabel.Name = "versionLabel";
this.versionLabel.Size = new System.Drawing.Size(38, 12);
this.versionLabel.TabIndex = 0;
- this.versionLabel.Text = "v3.8.2";
+ this.versionLabel.Text = "v3.8.3";
this.versionLabel.MouseDown += new System.Windows.Forms.MouseEventHandler(this.versionLabel_MouseDown);
//
// minimizeButton
diff --git a/src/MediaDownloader/program.cs b/src/MediaDownloader/program.cs
index e919302..0d800ea 100644
--- a/src/MediaDownloader/program.cs
+++ b/src/MediaDownloader/program.cs
@@ -25,7 +25,7 @@ public partial class program : Form
// program attributes
string title;
- const string ver = "v3.8.2";
+ const string ver = "v3.8.3";
// shortcut strings
const string md = "mediadownloader";
@@ -37,6 +37,7 @@ public partial class program : Form
bool ffmpegCheck;
// batch configuration
+ string filename = "";
string srtArgs;
bool useDefLoc;
string selLoc;
@@ -399,7 +400,11 @@ private void locationButton_Click(object sender, EventArgs e)
// open location button
private void openLocationButton_Click(object sender, EventArgs e)
{
- try { Process.Start("explorer.exe", selLoc == "" || useDefLoc ? "Downloads" : selLoc); } catch { }
+ string[] formats = { "", ".mp4", ".webm", ".gif", ".gif", "", "", ".mp3", ".wav", ".ogg" };
+ if (File.Exists((selLoc == "" || useDefLoc ? "Downloads" : selLoc) + "\\" + filename + formats[formatBox.SelectedIndex]))
+ Process.Start("explorer.exe", "/select, " + (selLoc == "" || useDefLoc ? "Downloads" : selLoc) + "\\" + filename + formats[formatBox.SelectedIndex]);
+ else
+ try { Process.Start("explorer.exe", selLoc == "" || useDefLoc ? "Downloads" : selLoc); } catch { }
}
// clear location button
@@ -516,39 +521,41 @@ private void downloadButton_Click(object sender, EventArgs e)
string dState5 = "[FINISHED]\n";
string dID = DateTime.Now.ToString("[Mdy-hms]");
+ filename = name + dID;
+
// mp4
- string mp4 = srtArgs + "--remux-video mp4 -o \"" + name + dID + ".mp4\" --path \"" + selLoc + "\" " + url;
- string mp4_useDefLoc = srtArgs + "--remux-video mp4 -o \"" + name + dID + ".mp4\" --path " + "\"..\\Downloads\" " + url;
- string mp4_useDefLoc_applyCodecs = srtArgs + "--remux-video mp4 -o \"tmp0.mp4\" " + url + title + dState1 + "ffmpeg.exe -loglevel verbose -i tmp0.mp4 -c:v h264 -c:a aac" + bVA + "\"..\\Downloads\\" + name + dID + ".mp4\"\n" + "del /f tmp0.mp4";
- string mp4_useDefLoc_useGpu = srtArgs + "--remux-video mp4 -o \"tmp0.mp4\" " + url + title + dState3 + "ffmpeg.exe -loglevel verbose -i tmp0.mp4 -c:v " + gEncode + " -c:a aac" + bVA + "\"..\\Downloads\\" + name + dID + ".mp4\"\n" + "del / f tmp0.mp4";
- string mp4_applyCodecs = srtArgs + "--remux-video mp4 -o \"tmp0.mp4\" " + url + title + dState1 + "ffmpeg.exe -loglevel verbose -i tmp0.mp4 -c:v h264 -c:a aac" + bVA + "\"" + selLoc + "\\" + name + dID + ".mp4\"\n" + "del /f tmp0.mp4";
- string mp4_useGpu = srtArgs + "--remux-video mp4 -o \"tmp0.mp4\" " + url + title + dState3 + "ffmpeg.exe -loglevel verbose -i tmp0.mp4 -c:v " + gEncode + " -c:a aac" + bVA + "\"" + selLoc + "\\" + name + dID + ".mp4\"\n" + "del /f tmp0.mp4"; ;
+ string mp4 = srtArgs + "--remux-video mp4 -o \"" + filename + ".mp4\" --path \"" + selLoc + "\" " + url;
+ string mp4_useDefLoc = srtArgs + "--remux-video mp4 -o \"" + filename + ".mp4\" --path " + "\"..\\Downloads\" " + url;
+ string mp4_useDefLoc_applyCodecs = srtArgs + "--remux-video mp4 -o \"tmp0.mp4\" " + url + title + dState1 + "ffmpeg.exe -loglevel verbose -i tmp0.mp4 -c:v h264 -c:a aac" + bVA + "\"..\\Downloads\\" + filename + ".mp4\"\n" + "del /f tmp0.mp4";
+ string mp4_useDefLoc_useGpu = srtArgs + "--remux-video mp4 -o \"tmp0.mp4\" " + url + title + dState3 + "ffmpeg.exe -loglevel verbose -i tmp0.mp4 -c:v " + gEncode + " -c:a aac" + bVA + "\"..\\Downloads\\" + filename + ".mp4\"\n" + "del / f tmp0.mp4";
+ string mp4_applyCodecs = srtArgs + "--remux-video mp4 -o \"tmp0.mp4\" " + url + title + dState1 + "ffmpeg.exe -loglevel verbose -i tmp0.mp4 -c:v h264 -c:a aac" + bVA + "\"" + selLoc + "\\" + filename + ".mp4\"\n" + "del /f tmp0.mp4";
+ string mp4_useGpu = srtArgs + "--remux-video mp4 -o \"tmp0.mp4\" " + url + title + dState3 + "ffmpeg.exe -loglevel verbose -i tmp0.mp4 -c:v " + gEncode + " -c:a aac" + bVA + "\"" + selLoc + "\\" + filename + ".mp4\"\n" + "del /f tmp0.mp4"; ;
// webm
- string webm = srtArgs + "--remux-video webm -o \"" + name + dID + ".webm\" --path \"" + selLoc + "\" " + url;
- string webm_useDefLoc = srtArgs + "--remux-video webm -o \"" + name + dID + ".webm\" --path " + "\"..\\Downloads\" " + url;
- string webm_useDefLoc_applyCodecs = srtArgs + "--remux-video webm -o \"tmp0.webm\" " + url + title + dState1 + "ffmpeg.exe -loglevel verbose -i tmp0.webm -c:v vp9 -c:a libvorbis" + bVA + "\"..\\Downloads\\" + name + dID + ".webm\"\n" + "del /f tmp0.webm";
- string webm_applyCodecs = srtArgs + "--remux-video webm -o \"tmp0.webm\" " + url + title + dState1 + "ffmpeg.exe -loglevel verbose -i tmp0.webm -c:v vp9 -c:a libvorbis" + bVA + "\"" + selLoc + "\\" + name + dID + ".webm\"\n" + "del /f tmp0.webm";
+ string webm = srtArgs + "--remux-video webm -o \"" + filename + ".webm\" --path \"" + selLoc + "\" " + url;
+ string webm_useDefLoc = srtArgs + "--remux-video webm -o \"" + filename + ".webm\" --path " + "\"..\\Downloads\" " + url;
+ string webm_useDefLoc_applyCodecs = srtArgs + "--remux-video webm -o \"tmp0.webm\" " + url + title + dState1 + "ffmpeg.exe -loglevel verbose -i tmp0.webm -c:v vp9 -c:a libvorbis" + bVA + "\"..\\Downloads\\" + filename + ".webm\"\n" + "del /f tmp0.webm";
+ string webm_applyCodecs = srtArgs + "--remux-video webm -o \"tmp0.webm\" " + url + title + dState1 + "ffmpeg.exe -loglevel verbose -i tmp0.webm -c:v vp9 -c:a libvorbis" + bVA + "\"" + selLoc + "\\" + filename + ".webm\"\n" + "del /f tmp0.webm";
// gif
- string gif = srtArgs + "--remux-video mp4 -o \"tmp0.mp4\" " + url + title + dState1 + "ffmpeg.exe -loglevel verbose -i tmp0.mp4 \"" + selLoc + "\\" + name + dID + ".gif\"\n" + "del /f tmp0.mp4";
- string gif_useDefLoc = srtArgs + "--remux-video mp4 -o \"tmp0.mp4\" " + url + title + dState1 + "ffmpeg.exe -loglevel verbose -i tmp0.mp4 " + "\"..\\Downloads\\" + name + dID + ".gif\"\n" + "del /f tmp0.mp4";
+ string gif = srtArgs + "--remux-video mp4 -o \"tmp0.mp4\" " + url + title + dState1 + "ffmpeg.exe -loglevel verbose -i tmp0.mp4 \"" + selLoc + "\\" + filename + ".gif\"\n" + "del /f tmp0.mp4";
+ string gif_useDefLoc = srtArgs + "--remux-video mp4 -o \"tmp0.mp4\" " + url + title + dState1 + "ffmpeg.exe -loglevel verbose -i tmp0.mp4 " + "\"..\\Downloads\\" + filename + ".gif\"\n" + "del /f tmp0.mp4";
// gif (web)
- string gifWeb = srtArgs + "--remux-video mp4 -o \"tmp0.mp4\" " + url + title + dState1 + "ffmpeg.exe -loglevel verbose -i tmp0.mp4 -vf scale=" + gifR + ":-1 -r " + gifF + " \"" + selLoc + "\\" + name + dID + ".gif\"\n" + "del /f tmp0.mp4";
- string gifWeb_useDefLoc = srtArgs + "--remux-video mp4 -o \"tmp0.mp4\" " + url + title + dState1 + "ffmpeg.exe -loglevel verbose -i tmp0.mp4 -vf scale=" + gifR + ":-1 -r " + gifF + " \"..\\Downloads\\" + name + dID + ".gif\"\n" + "del /f tmp0.mp4";
+ string gifWeb = srtArgs + "--remux-video mp4 -o \"tmp0.mp4\" " + url + title + dState1 + "ffmpeg.exe -loglevel verbose -i tmp0.mp4 -vf scale=" + gifR + ":-1 -r " + gifF + " \"" + selLoc + "\\" + filename + ".gif\"\n" + "del /f tmp0.mp4";
+ string gifWeb_useDefLoc = srtArgs + "--remux-video mp4 -o \"tmp0.mp4\" " + url + title + dState1 + "ffmpeg.exe -loglevel verbose -i tmp0.mp4 -vf scale=" + gifR + ":-1 -r " + gifF + " \"..\\Downloads\\" + filename + ".gif\"\n" + "del /f tmp0.mp4";
// mp3
- string mp3 = srtArgs + "-x -o \"" + name + dID + ".mp3\" --audio-format mp3 --path \"" + selLoc + "\" " + url;
- string mp3_useDefLoc = srtArgs + "-x -o \"" + name + dID + ".mp3\" --audio-format mp3 --path " + "\"..\\Downloads\" " + url;
+ string mp3 = srtArgs + "-x -o \"" + filename + ".mp3\" --audio-format mp3 --path \"" + selLoc + "\" " + url;
+ string mp3_useDefLoc = srtArgs + "-x -o \"" + filename + ".mp3\" --audio-format mp3 --path " + "\"..\\Downloads\" " + url;
// wav
- string wav = srtArgs + "-x -o \"" + name + dID + ".wav\" --audio-format wav --path \"" + selLoc + "\" " + url;
- string wav_useDefLoc = srtArgs + "-x -o \"" + name + dID + ".wav\" --audio-format wav --path " + "\"..\\Downloads\" " + url;
+ string wav = srtArgs + "-x -o \"" + filename + ".wav\" --audio-format wav --path \"" + selLoc + "\" " + url;
+ string wav_useDefLoc = srtArgs + "-x -o \"" + filename + ".wav\" --audio-format wav --path " + "\"..\\Downloads\" " + url;
// ogg
- string ogg = srtArgs + "--remux-video mp4 -o \"tmp0.mp4\" " + url + title + dState1 + "ffmpeg.exe -loglevel verbose -i tmp0.mp4 -c:a libmp3lame tmp1.mp3" + title + dState2 + "ffmpeg.exe -loglevel verbose -i tmp1.mp3 -c:a libvorbis \"" + selLoc + "\\" + name + dID + ".ogg\"" + "\ndel /f tmp0.mp4" + "\ndel /f tmp1.mp3";
- string ogg_useDefLoc = srtArgs + "--remux-video mp4 -o \"tmp0.mp4\" " + url + title + dState1 + "ffmpeg.exe -loglevel verbose -i tmp0.mp4 -c:a libmp3lame tmp1.mp3" + title + dState2 + "ffmpeg.exe -loglevel verbose -i tmp1.mp3 -c:a libvorbis " + "\"..\\Downloads\\" + name + dID + ".ogg\"" + "\ndel /f tmp0.mp4" + "\ndel /f tmp1.mp3";
+ string ogg = srtArgs + "--remux-video mp4 -o \"tmp0.mp4\" " + url + title + dState1 + "ffmpeg.exe -loglevel verbose -i tmp0.mp4 -c:a libmp3lame tmp1.mp3" + title + dState2 + "ffmpeg.exe -loglevel verbose -i tmp1.mp3 -c:a libvorbis \"" + selLoc + "\\" + filename + ".ogg\"" + "\ndel /f tmp0.mp4" + "\ndel /f tmp1.mp3";
+ string ogg_useDefLoc = srtArgs + "--remux-video mp4 -o \"tmp0.mp4\" " + url + title + dState1 + "ffmpeg.exe -loglevel verbose -i tmp0.mp4 -c:a libmp3lame tmp1.mp3" + title + dState2 + "ffmpeg.exe -loglevel verbose -i tmp1.mp3 -c:a libvorbis " + "\"..\\Downloads\\" + filename + ".ogg\"" + "\ndel /f tmp0.mp4" + "\ndel /f tmp1.mp3";
// (yt-dlp arguments)
string ytdlpArgs = srtArgs + "--path \"" + selLoc + "\" " + ytArgs + " " + url;
@@ -617,7 +624,8 @@ private void downloadButton_Click(object sender, EventArgs e)
if (form == 12) { MessageBox.Show("Trimming cannot be used with with format."); return; }
if (fExt == null) return;
- if (useDefLoc) mdScr += title + dState4 + "ffmpeg.exe -loglevel verbose -i \"..\\Downloads\\" + name + dID + fExt + "\" -ss " + timeS + " -to " + timeE + bVA + "\"..\\Downloads\\" + name + "_trim" + dID + fExt + "\"\ndel /f \"..\\Downloads\\" + name + dID + fExt + "\""; else mdScr += title + dState4 + "ffmpeg.exe -loglevel verbose -i \"" + selLoc + "\\" + name + dID + fExt + "\" -ss " + timeS + " -to " + timeE + bVA + "\"" + selLoc + "\\" + name + "_trim" + dID + fExt + "\"\ndel /f \"" + selLoc + "\\" + name + dID + fExt + "\"";
+ if (useDefLoc) mdScr += title + dState4 + "ffmpeg.exe -loglevel verbose -i \"..\\Downloads\\" + filename + fExt + "\" -ss " + timeS + " -to " + timeE + bVA + "\"..\\Downloads\\" + name + "_trim" + dID + fExt + "\"\ndel /f \"..\\Downloads\\" + filename + fExt + "\""; else mdScr += title + dState4 + "ffmpeg.exe -loglevel verbose -i \"" + selLoc + "\\" + filename + fExt + "\" -ss " + timeS + " -to " + timeE + bVA + "\"" + selLoc + "\\" + name + "_trim" + dID + fExt + "\"\ndel /f \"" + selLoc + "\\" + filename + fExt + "\"";
+ filename = name + "_trim" + dID;
}
// inject pause
diff --git a/src/MediaDownloader/program.resx b/src/MediaDownloader/program.resx
index 26fefb2..c51923b 100644
--- a/src/MediaDownloader/program.resx
+++ b/src/MediaDownloader/program.resx
@@ -470,7 +470,7 @@
iVBORw0KGgoAAAANSUhEUgAAAV0AAADFCAYAAAD3yiEtAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
- vgAADr4B6kKxwAAAosBJREFUeF7t/VfaJcmRJIjGAroKnCdoghdF0UahSL/MUy/gfr2beb/rmHXGqIio
+ vAAADrwBlbxySQAAosBJREFUeF7t/VfaJcmRJIjGAroKnCdoghdF0UahSL/MUy/gfr2beb/rmHXGqIio
qKqZm59z/ohIAN2TD/IpExVV9+Nm+DNR5N1f/OV/ew/8t78IwP+LvyAQ08/aX/ylcuYol33mZo558FmH
BnzpgiOdEadPfsJa6GdMBM82daWR+gPSyXhwpH3lk5O12aP6uhOt/cQ+C9De6pfNWtjz/EOeOfWzlryl
XvOutWX2LZ5zWntyn/W9Mls47/7njL9M3NXO/l+W33BuryFecl9JVO5m/uRsPa156s3cwr/y2B+cdbd+