Archived
1
0

Channel rebuild

This commit is contained in:
Michael Gordeev
2018-08-02 02:39:27 +03:00
parent e6547b06be
commit ee96d7b75e
10 changed files with 531 additions and 435 deletions
+3 -5
View File
@@ -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();
}