Archived
1
0

Improving thumbnails quality

This commit is contained in:
Michael Gordeev
2018-12-30 12:44:39 +03:00
parent f927d77cd3
commit f797b4f851
3 changed files with 7 additions and 4 deletions
+5 -2
View File
@@ -65,7 +65,10 @@ namespace FoxTube.Controls
else
{
views.Text = $"{item.Statistics.ViewCount:0,0} views";
info.Text = $"{XmlConvert.ToTimeSpan(item.ContentDetails.Duration)} | {Methods.GetAgo(item.Snippet.PublishedAt.Value)}";
string dur = string.Empty;
try { XmlConvert.ToTimeSpan(item.ContentDetails.Duration); }
catch { }
info.Text = $"{dur} | {Methods.GetAgo(item.Snippet.PublishedAt.Value)}";
embed = false;
}
@@ -76,7 +79,7 @@ namespace FoxTube.Controls
try
{
avatar.ProfilePicture = new BitmapImage(new Uri(response1.Items[0].Snippet.Thumbnails.Medium.Url));
thumbnail.Source = new BitmapImage(new Uri(item.Snippet.Thumbnails.Medium.Url));
thumbnail.Source = new BitmapImage(new Uri((item.Snippet.Thumbnails.Maxres ?? item.Snippet.Thumbnails.Medium).Url));
}
catch { }