Improving thumbnails quality
This commit is contained in:
@@ -74,7 +74,7 @@ namespace FoxTube.Controls
|
|||||||
{
|
{
|
||||||
if (item.BrandingSettings.Image.BannerImageUrl.Contains("default"))
|
if (item.BrandingSettings.Image.BannerImageUrl.Contains("default"))
|
||||||
throw new Exception("Default channel cover detected");
|
throw new Exception("Default channel cover detected");
|
||||||
cover.Source = new BitmapImage(new Uri(item.BrandingSettings.Image.BannerTvLowImageUrl));
|
cover.Source = new BitmapImage((item.BrandingSettings.Image.BannerTvHighImageUrl ?? item.BrandingSettings.Image.BannerTvImageUrl).ToUri());
|
||||||
}
|
}
|
||||||
catch { }
|
catch { }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ namespace FoxTube.Controls
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
thumbnail.Source = new BitmapImage(new Uri(item.Snippet.Thumbnails.Medium.Url));
|
thumbnail.Source = new BitmapImage((item.Snippet.Thumbnails.Maxres ?? item.Snippet.Thumbnails.Medium).Url.ToUri());
|
||||||
avatar.ProfilePicture = new BitmapImage(new Uri((await r.ExecuteAsync()).Items[0].Snippet.Thumbnails.Medium.Url));
|
avatar.ProfilePicture = new BitmapImage(new Uri((await r.ExecuteAsync()).Items[0].Snippet.Thumbnails.Medium.Url));
|
||||||
} catch { }
|
} catch { }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -65,7 +65,10 @@ namespace FoxTube.Controls
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
views.Text = $"{item.Statistics.ViewCount:0,0} views";
|
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;
|
embed = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -76,7 +79,7 @@ namespace FoxTube.Controls
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
avatar.ProfilePicture = new BitmapImage(new Uri(response1.Items[0].Snippet.Thumbnails.Medium.Url));
|
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 { }
|
catch { }
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user