diff --git a/WPFMETRO/Localization/Strings.Designer.cs b/WPFMETRO/Localization/Strings.Designer.cs
index 83cb8a0..b358c2e 100644
--- a/WPFMETRO/Localization/Strings.Designer.cs
+++ b/WPFMETRO/Localization/Strings.Designer.cs
@@ -574,7 +574,7 @@ public static string RestartChanges {
}
///
- /// Looks up a localized string similar to Retrieving Formats....
+ /// Looks up a localized string similar to Retrieving Video Metadata....
///
public static string RetrevingFormats {
get {
diff --git a/WPFMETRO/Localization/Strings.pt-BR.resx b/WPFMETRO/Localization/Strings.pt-BR.resx
index 1dc7f0b..16be65d 100644
--- a/WPFMETRO/Localization/Strings.pt-BR.resx
+++ b/WPFMETRO/Localization/Strings.pt-BR.resx
@@ -289,7 +289,7 @@
Para aplicar as mudanças de idioma, reinicie o programa
- Buscando Formatos...
+ Buscando Dados...
Salvar
diff --git a/WPFMETRO/Localization/Strings.resx b/WPFMETRO/Localization/Strings.resx
index 642b737..f0b207c 100644
--- a/WPFMETRO/Localization/Strings.resx
+++ b/WPFMETRO/Localization/Strings.resx
@@ -289,7 +289,7 @@
Restart the program to apply language changes
- Retrieving Formats...
+ Retrieving Video Metadata...
Save Changes
diff --git a/WPFMETRO/MainWindow.xaml.cs b/WPFMETRO/MainWindow.xaml.cs
index b2bdb94..bbe382c 100644
--- a/WPFMETRO/MainWindow.xaml.cs
+++ b/WPFMETRO/MainWindow.xaml.cs
@@ -134,6 +134,7 @@ private bool IsRunningAsAdmin()
private async void SelectButton_Click(object sender, RoutedEventArgs e)
{
+ DownloadStatus.Text = Localization.Strings.RetrevingFormats;
UrlBox.Background = Brushes.Transparent;
formats.Clear();
string Url = UrlBox.Text;
@@ -145,11 +146,12 @@ private async void SelectButton_Click(object sender, RoutedEventArgs e)
FiletypeBox.ItemsSource = formats;
FiletypeBox.IsEnabled = AddToQueueButton.IsEnabled = true;
UrlBox.Background = Brushes.DarkGreen;
+
+
}
else
{
UrlBox.Text = UrlBox.Text.Contains(@"&list=") ? UrlBox.Text.Substring(0, UrlBox.Text.IndexOf(@"&list=")) : UrlBox.Text;
- DownloadStatus.Text = Localization.Strings.RetrevingFormats;
await Task.Run(() => formats=queue.GetFormats(Url));
await Task.Run(() => videoInfo=queue.GetInfo(Url));
@@ -284,7 +286,9 @@ public void UpdateCard()
if (video.ThumbURL != null)
{
- var imageData = new WebClient().DownloadData(new Uri(video.ThumbURL + ".jpg"));
+ string extension = video.ThumbURL.Substring(video.ThumbURL.LastIndexOf("."));
+ video.ThumbURL = extension == ".jpg" ? video.ThumbURL : video.ThumbURL + ".jpg";
+ var imageData = new WebClient().DownloadData(new Uri(video.ThumbURL));
var bitmapImage = new BitmapImage { CacheOption = BitmapCacheOption.OnLoad };
bitmapImage.BeginInit();
bitmapImage.StreamSource = new MemoryStream(imageData);
diff --git a/WPFMETRO/Properties/AssemblyInfo.cs b/WPFMETRO/Properties/AssemblyInfo.cs
index ed4bdba..fc8a736 100644
--- a/WPFMETRO/Properties/AssemblyInfo.cs
+++ b/WPFMETRO/Properties/AssemblyInfo.cs
@@ -51,5 +51,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.5.0.6")]
-[assembly: AssemblyFileVersion("1.5.0.6")]
+[assembly: AssemblyVersion("1.5.0.7")]
+[assembly: AssemblyFileVersion("1.5.0.7")]
diff --git a/WPFMETRO/Queue.cs b/WPFMETRO/Queue.cs
index 17a4d28..69f8be5 100644
--- a/WPFMETRO/Queue.cs
+++ b/WPFMETRO/Queue.cs
@@ -101,7 +101,7 @@ public Dictionary GetFormats(string url)
{
output = f.Data ?? "null";
- if (output != "null")
+ if (output != "null" && !output.Contains("["))
{
if (isNext)
{
@@ -172,23 +172,7 @@ public void DownloadPlaylist(string ID, string filename, string path, string fil
foreach (var playlistItem in playlistItemsListResponse.Items)
{
- var videoRequest = yt.Videos.List("snippet,status");
-
- videoRequest.Id = playlistItem.Id;
-
- var videoListResponse = videoRequest.Execute();
-
- if (videoListResponse.Items.Count < 1)
- {
- throw new QueueException(Localization.Strings.InvalidURL);
- }
- foreach (var videoItem in videoListResponse.Items)
- {
- if (videoItem.Status != null)
- {
- ModifyQueue(videoItem.Snippet.Title, videoItem.Snippet.Thumbnails.Default__.Url, "https://www.youtube.com/watch?v=" + playlistItem.Snippet.ResourceId.VideoId, filename, path, filetype, formats);
- }
- }
+ ModifyQueue(playlistItem.Snippet.Title, playlistItem.Snippet.Thumbnails.Default__.Url, "https://www.youtube.com/watch?v=" + playlistItem.Snippet.ResourceId.VideoId, filename, path, filetype, formats);
}
nextPageToken = playlistItemsListResponse.NextPageToken;