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
+14
View File
@@ -1,5 +1,19 @@
<?xml version="1.0" encoding="utf-8" ?>
<items>
<item>
<content time="2019-06-23" version="1.2">
<en-US>### What's new:
- 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
</en-US>
<ru-RU>### Что нового:
- Исправлены некоторые случаи при которых карточки плейлистов не отображались
- Исправлены некоторые случай при которых приложение вылетало
- Исправлены вылеты приложения при попытке перейти на несуществующий канал/плейлист/видео
</ru-RU>
</content>
</item>
<item time="2019-06-20" version="1.1">
<content>
<en-US>### What's new:
+1
View File
@@ -28,6 +28,7 @@ namespace FoxTube
}
catch (Exception e)
{
settings.Values["downloads"] = JsonConvert.SerializeObject(new List<DownloadItemContainer>());
Analytics.TrackEvent("Failed to load downloads history", new Dictionary<string, string>
{
{ "Exception", e.GetType().ToString() },
+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();
}
+2
View File
@@ -121,6 +121,8 @@ namespace FoxTube.Controls
{
(Parent as AdaptiveGridView)?.Items.Remove(this);
Visibility = Visibility.Collapsed;
if (item == null)
return;
Analytics.TrackEvent("VideoCard loading failed", new Dictionary<string, string>()
{
{ "Exception", e.GetType().ToString() },
+6
View File
@@ -113,6 +113,12 @@ namespace FoxTube.Pages
}
catch (Exception e)
{
if(item == null)
{
Methods.MainPage.PageContent.LoadingPage.Error("ChannelNotFound", "Such channel doesn't exist");
return;
}
Methods.MainPage.PageContent.LoadingPage.Error(e.GetType().ToString(), e.Message);
Analytics.TrackEvent("Channel loading error", new Dictionary<string, string>()
{
+12 -3
View File
@@ -63,8 +63,12 @@ namespace FoxTube.Pages
channelName.Text = Methods.GuardFromNull(item.Snippet.ChannelTitle);
avatar.ProfilePicture = new BitmapImage((await new YoutubeExplode.YoutubeClient().GetChannelAsync(item.Snippet.ChannelId)).LogoUrl.ToUri()) { DecodePixelWidth = 50, DecodePixelHeight = 50 };
thumbnail.Source = new BitmapImage(item.Snippet.Thumbnails.Medium.Url.ToUri());
try
{
thumbnail.Source = new BitmapImage(item.Snippet.Thumbnails.Medium.Url.ToUri());
avatar.ProfilePicture = new BitmapImage((await new YoutubeExplode.YoutubeClient().GetChannelAsync(item.Snippet.ChannelId)).LogoUrl.ToUri()) { DecodePixelWidth = 50, DecodePixelHeight = 50 };
}
catch { }
request = SecretsVault.Service.PlaylistItems.List("contentDetails");
request.PlaylistId = id;
@@ -126,6 +130,11 @@ namespace FoxTube.Pages
}
catch (Exception e)
{
if (item == null)
{
Methods.MainPage.PageContent.LoadingPage.Error("PlaylistNotFound", "Such playlist doesn't exist");
return;
}
Methods.MainPage.PageContent.LoadingPage.Error(e.GetType().ToString(), e.Message);
Analytics.TrackEvent("WL playlist loading error", new Dictionary<string, string>()
{
@@ -148,7 +157,7 @@ namespace FoxTube.Pages
private void refresh_Click(object sender, RoutedEventArgs e)
{
Methods.MainPage.VideoContent.Refresh();
Methods.MainPage.PageContent.Refresh();
}
private void share_Click(object sender, RoutedEventArgs e)
+6
View File
@@ -136,6 +136,12 @@ namespace FoxTube.Pages
}
catch (Exception e)
{
if (item == null)
{
Methods.MainPage.PageContent.LoadingPage.Error("VideoNotFound", "Such video doesn't exist");
return;
}
Methods.MainPage.VideoContent.LoadingPage.Error(e.GetType().ToString(), e.Message);
Analytics.TrackEvent("Video loading error", new Dictionary<string, string>()
{