[Hotfix] Updated VideoCard.xaml.cs
This commit is contained in:
@@ -99,10 +99,14 @@ namespace FoxTube.Controls
|
||||
}
|
||||
LoadAddTo();
|
||||
|
||||
var channelRequest = SecretsVault.Service.Channels.List("snippet");
|
||||
channelRequest.Id = item.Snippet.ChannelId;
|
||||
|
||||
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 };
|
||||
avatar.ProfilePicture = new BitmapImage((await channelRequest.ExecuteAsync()).Items[0].Snippet.Thumbnails.Medium.Url.ToUri()) { DecodePixelHeight = 46, DecodePixelWidth = 46 };
|
||||
//avatar.ProfilePicture = new BitmapImage((await new YoutubeClient().GetChannelAsync(item.Snippet.ChannelId)).LogoUrl.ToUri()) { DecodePixelWidth = 46, DecodePixelHeight = 46 };
|
||||
}
|
||||
catch { }
|
||||
|
||||
@@ -208,8 +212,16 @@ namespace FoxTube.Controls
|
||||
info.Text = $"{item.ContentDetails.Duration.GetDuration()} | {Methods.GetAgo(item.Snippet.PublishedAt.Value)}";
|
||||
}
|
||||
|
||||
thumbnail.Source = new BitmapImage(item.Snippet.Thumbnails.Medium.Url.ToUri());
|
||||
avatar.ProfilePicture = new BitmapImage((await new YoutubeClient().GetChannelAsync(item.Snippet.ChannelId)).LogoUrl.ToUri()) { DecodePixelHeight = 50, DecodePixelWidth = 50 };
|
||||
var channelRequest = SecretsVault.Service.Channels.List("snippet");
|
||||
channelRequest.Id = item.Snippet.ChannelId;
|
||||
|
||||
try
|
||||
{
|
||||
thumbnail.Source = new BitmapImage(item.Snippet.Thumbnails.Medium.Url.ToUri());
|
||||
avatar.ProfilePicture = new BitmapImage((await channelRequest.ExecuteAsync()).Items[0].Snippet.Thumbnails.Medium.Url.ToUri()) { DecodePixelHeight = 46, DecodePixelWidth = 46 };
|
||||
//avatar.ProfilePicture = new BitmapImage((await new YoutubeClient().GetChannelAsync(item.Snippet.ChannelId)).LogoUrl.ToUri()) { DecodePixelWidth = 46, DecodePixelHeight = 46 };
|
||||
}
|
||||
catch { }
|
||||
|
||||
if (SecretsVault.History.Contains(item.Id))
|
||||
watched.Visibility = Visibility.Visible;
|
||||
|
||||
Reference in New Issue
Block a user