- 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:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user