Channel rebuild
This commit is contained in:
@@ -53,15 +53,13 @@ namespace FoxTube.Pages
|
||||
loading.Error("NullReferenceException", "Unable to initialize search. Search term is not stated.");
|
||||
else
|
||||
Initialize(e.Parameter as string);
|
||||
|
||||
|
||||
}
|
||||
|
||||
public async void Initialize(string id)
|
||||
{
|
||||
loading.Refresh();
|
||||
|
||||
//try
|
||||
try
|
||||
{
|
||||
playlistId = id;
|
||||
PlaylistsResource.ListRequest request = SecretsVault.Service.Playlists.List("snippet,contentDetails");
|
||||
@@ -80,7 +78,7 @@ namespace FoxTube.Pages
|
||||
thumbnail.Source = new BitmapImage(new Uri(item.Snippet.Thumbnails.Medium.Url));
|
||||
ChannelsResource.ListRequest channelRequest = SecretsVault.Service.Channels.List("snippet");
|
||||
channelRequest.Id = item.Snippet.ChannelId;
|
||||
Google.Apis.YouTube.v3.Data.Channel channel = (await channelRequest.ExecuteAsync()).Items[0];
|
||||
Channel channel = (await channelRequest.ExecuteAsync()).Items[0];
|
||||
avatar.ProfilePicture = new BitmapImage(new Uri(channel.Snippet.Thumbnails.Medium.Url));
|
||||
}
|
||||
catch { }
|
||||
@@ -106,7 +104,7 @@ namespace FoxTube.Pages
|
||||
|
||||
loading.Close();
|
||||
}
|
||||
//catch
|
||||
catch
|
||||
{
|
||||
loading.Error();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user