Archived
1
0

- Fixed some cases when playlist cards aren't displayed

- Fixed some cases when the app crashes
- Fixed app crashes on trying to navigate to not existing channel/playlist/video
This commit is contained in:
Michael Gordeev
2019-06-23 12:26:03 +03:00
parent 8f863edfad
commit 2140ec0d5f
7 changed files with 48 additions and 5 deletions
+7 -2
View File
@@ -9,6 +9,7 @@ using Windows.System;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Media.Imaging;
using YoutubeExplode;
namespace FoxTube.Controls
{
@@ -46,8 +47,12 @@ namespace FoxTube.Controls
ChannelsResource.ListRequest r = SecretsVault.Service.Channels.List("snippet");
r.Id = item.Snippet.ChannelId;
thumbnail.Source = new BitmapImage(item.Snippet.Thumbnails.Medium.Url.ToUri());
avatar.ProfilePicture = new BitmapImage(new Uri((await r.ExecuteAsync()).Items[0].Snippet.Thumbnails.Medium.Url)) { DecodePixelWidth = 46, DecodePixelHeight = 46 };
try
{
thumbnail.Source = new BitmapImage(item.Snippet.Thumbnails.Medium.Url.ToUri());
avatar.ProfilePicture = new BitmapImage((await new YoutubeClient().GetChannelAsync(item.Snippet.ChannelId)).LogoUrl.ToUri()) { DecodePixelWidth = 46, DecodePixelHeight = 46 };
}
catch { }
show.Begin();
}