Skip to content

Commit 7661675

Browse files
committed
Fix: proper argument to get video title
1 parent 1997130 commit 7661675

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

YTDLGUI/fmGUI.cs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -209,11 +209,6 @@ private void buttonClear_Click(object sender, EventArgs e)
209209

210210
private async void buttonDownload_Click(object sender, EventArgs e)
211211
{
212-
if (tabControl.SelectedIndex == 2)
213-
{
214-
tabControl.SelectedIndex = 0;
215-
return;
216-
}
217212
var mode = tabControl.SelectedIndex;
218213
foreach (string url in textURL.Lines)
219214
{
@@ -291,7 +286,7 @@ private string GetTitle(string url)
291286
using (Process p = new Process())
292287
{
293288
p.StartInfo.FileName = "yt-dlp.exe";
294-
p.StartInfo.Arguments = $"--no-playlist --get-title --encoding \"UTF-8\" \"{url}\"";
289+
p.StartInfo.Arguments = $"--encoding \"UTF-8\" --print filename -o \"%(title)s\" \"{url}\"";
295290
p.StartInfo.CreateNoWindow = true;
296291
p.StartInfo.UseShellExecute = false;
297292
p.StartInfo.StandardOutputEncoding = Encoding.UTF8;

0 commit comments

Comments
 (0)