Skip to content
This repository has been archived by the owner on Jan 19, 2022. It is now read-only.

Commit

Permalink
Playlist download fix
Browse files Browse the repository at this point in the history
  • Loading branch information
gfrn committed Dec 19, 2020
1 parent 462df65 commit 308efd7
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions WPFMETRO/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ private async void SelectButton_Click(object sender, RoutedEventArgs e)
UrlBox.Background = Brushes.Transparent;
formats.Clear();
string Url = UrlBox.Text;
if (Properties.Settings.Default.PrioritizePlaylists && UrlBox.Text.Contains(@"&list="))
if (Properties.Settings.Default.PrioritizePlaylists && UrlBox.Text.Contains(@"playlist?list="))
{
formats.Add("default", "default (mp4)");
formats.Add("mp3", "mp3");
Expand Down Expand Up @@ -325,8 +325,14 @@ private void AddToQueueButton_Click(object sender, RoutedEventArgs e)
string filename = UseVideoTitleBox.IsChecked == true ? "%(title)s.%(ext)s" : FilenameBox.Text + ".%(ext)s"; //Get around nullable bool state
string path = PathBox.Text + @"\";
string filetype = formats.FirstOrDefault(x => x.Value == FiletypeBox.Text).Key;
string title = videoInfo[0];
string thumbURL = videoInfo[1] == "N.A" ? null : videoInfo[1];
string thumbURL = "";
string title = "";

if (videoInfo.Count > 0)
{
title = videoInfo[0];
thumbURL = videoInfo[1] == "N.A" ? null : videoInfo[1];
}

if (filetype == null)
{
Expand Down

0 comments on commit 308efd7

Please sign in to comment.