bug fixes
This commit is contained in:
@@ -144,6 +144,7 @@ namespace FoxTube.Controls
|
|||||||
request.ParentId = item.Id;
|
request.ParentId = item.Id;
|
||||||
request.MaxResults = 10;
|
request.MaxResults = 10;
|
||||||
request.PageToken = NextPageToken;
|
request.PageToken = NextPageToken;
|
||||||
|
request.TextFormat = CommentsResource.ListRequest.TextFormatEnum.PlainText;
|
||||||
var response = await request.ExecuteAsync();
|
var response = await request.ExecuteAsync();
|
||||||
|
|
||||||
foreach (Comment c in response.Items)
|
foreach (Comment c in response.Items)
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ namespace FoxTube.Controls
|
|||||||
title.Text = item.Snippet.Title;
|
title.Text = item.Snippet.Title;
|
||||||
channelName.Text = item.Snippet.ChannelTitle;
|
channelName.Text = item.Snippet.ChannelTitle;
|
||||||
counter.Text = item.ContentDetails.ItemCount.ToString();
|
counter.Text = item.ContentDetails.ItemCount.ToString();
|
||||||
date.Text = item.Snippet.PublishedAt.ToString();
|
date.Text = Methods.GetAgo(item.Snippet.PublishedAt.Value);
|
||||||
|
|
||||||
ChannelsResource.ListRequest r = SecretsVault.NoAuthService.Channels.List("snippet");
|
ChannelsResource.ListRequest r = SecretsVault.NoAuthService.Channels.List("snippet");
|
||||||
r.Id = item.Snippet.ChannelId;
|
r.Id = item.Snippet.ChannelId;
|
||||||
|
|||||||
@@ -9,13 +9,12 @@
|
|||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="1080"
|
d:DesignHeight="1080"
|
||||||
d:DesignWidth="1920"
|
d:DesignWidth="1920"
|
||||||
Tapped="UserControl_Tapped"
|
|
||||||
DoubleTapped="UserControl_DoubleTapped"
|
DoubleTapped="UserControl_DoubleTapped"
|
||||||
PointerMoved="UserControl_PointerMoved"
|
PointerMoved="UserControl_PointerMoved"
|
||||||
PointerExited="UserControl_PointerExited"
|
PointerExited="UserControl_PointerExited"
|
||||||
PointerEntered="UserControl_PointerEntered">
|
PointerEntered="UserControl_PointerEntered">
|
||||||
|
|
||||||
<Grid Background="White" Name="grid">
|
<Grid Background="White" Name="grid" Tapped="UserControl_Tapped">
|
||||||
<MediaElement IsDoubleTapEnabled="False" CurrentStateChanged="videoSource_CurrentStateChanged" AutoPlay="False" Name="videoSource" AreTransportControlsEnabled="False" PosterSource="ms-appx:///Assets/videoThumbSample.png"/>
|
<MediaElement IsDoubleTapEnabled="False" CurrentStateChanged="videoSource_CurrentStateChanged" AutoPlay="False" Name="videoSource" AreTransportControlsEnabled="False" PosterSource="ms-appx:///Assets/videoThumbSample.png"/>
|
||||||
<TextBox Name="subtitleCapture" Visibility="Collapsed" Text="This is subtitle capture" Background="#99000000" VerticalAlignment="Bottom" HorizontalAlignment="Center" Foreground="White" FontSize="24" Padding="10" Margin="0,0,0,100"/>
|
<TextBox Name="subtitleCapture" Visibility="Collapsed" Text="This is subtitle capture" Background="#99000000" VerticalAlignment="Bottom" HorizontalAlignment="Center" Foreground="White" FontSize="24" Padding="10" Margin="0,0,0,100"/>
|
||||||
<Grid Name="controls" Visibility="Visible">
|
<Grid Name="controls" Visibility="Visible">
|
||||||
@@ -42,6 +41,8 @@
|
|||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
|
<Grid Grid.Row="1" Name="playPauseArea" Tapped="playPauseArea_Tapped"/>
|
||||||
|
|
||||||
<Grid Name="touchCentral" Background="#7F000000" Visibility="Collapsed" Grid.Row="1">
|
<Grid Name="touchCentral" Background="#7F000000" Visibility="Collapsed" Grid.Row="1">
|
||||||
<StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
|
<StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||||
<Button VerticalAlignment="Center" Content="" FontFamily="Segoe MDL2 Assets" Background="Transparent" FontSize="40" Foreground="WhiteSmoke" Name="touchBack10" Click="back10_Click"/>
|
<Button VerticalAlignment="Center" Content="" FontFamily="Segoe MDL2 Assets" Background="Transparent" FontSize="40" Foreground="WhiteSmoke" Name="touchBack10" Click="back10_Click"/>
|
||||||
|
|||||||
@@ -794,5 +794,10 @@ namespace FoxTube
|
|||||||
else if (!miniView && !fullScreen)
|
else if (!miniView && !fullScreen)
|
||||||
fullscreen_Click(this, null);
|
fullscreen_Click(this, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void playPauseArea_Tapped(object sender, TappedRoutedEventArgs e)
|
||||||
|
{
|
||||||
|
if (e.PointerDeviceType == Windows.Devices.Input.PointerDeviceType.Mouse) ;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -160,7 +160,6 @@ namespace FoxTube.Pages
|
|||||||
playlistRequest = SecretsVault.Service.Search.List("id");
|
playlistRequest = SecretsVault.Service.Search.List("id");
|
||||||
playlistRequest.ChannelId = channelId;
|
playlistRequest.ChannelId = channelId;
|
||||||
playlistRequest.Type = "playlist";
|
playlistRequest.Type = "playlist";
|
||||||
playlistRequest.Order = SearchResource.ListRequest.OrderEnum.Date;
|
|
||||||
playlistRequest.MaxResults = 48;
|
playlistRequest.MaxResults = 48;
|
||||||
|
|
||||||
SearchListResponse response = await playlistRequest.ExecuteAsync();
|
SearchListResponse response = await playlistRequest.ExecuteAsync();
|
||||||
|
|||||||
@@ -127,6 +127,7 @@ namespace FoxTube.Pages
|
|||||||
var request = SecretsVault.Service.CommentThreads.List("snippet,replies");
|
var request = SecretsVault.Service.CommentThreads.List("snippet,replies");
|
||||||
request.Order = order;
|
request.Order = order;
|
||||||
request.VideoId = threadId;
|
request.VideoId = threadId;
|
||||||
|
request.TextFormat = CommentThreadsResource.ListRequest.TextFormatEnum.PlainText;
|
||||||
var response = await request.ExecuteAsync();
|
var response = await request.ExecuteAsync();
|
||||||
|
|
||||||
nextPageToken = response.NextPageToken;
|
nextPageToken = response.NextPageToken;
|
||||||
|
|||||||
@@ -17,12 +17,15 @@ using Windows.UI.Xaml.Navigation;
|
|||||||
|
|
||||||
namespace FoxTube
|
namespace FoxTube
|
||||||
{
|
{
|
||||||
|
public enum LoadingState { Loadnig, Loaded, Error, Blocked }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// An empty page that can be used on its own or navigated to within a Frame.
|
/// An empty page that can be used on its own or navigated to within a Frame.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public sealed partial class LoadingPage : Page
|
public sealed partial class LoadingPage : Page
|
||||||
{
|
{
|
||||||
public event RoutedEventHandler RefreshPage;
|
public event RoutedEventHandler RefreshPage;
|
||||||
|
public LoadingState State { get; private set; } = LoadingState.Loadnig;
|
||||||
|
|
||||||
public LoadingPage()
|
public LoadingPage()
|
||||||
{
|
{
|
||||||
@@ -50,6 +53,8 @@ namespace FoxTube
|
|||||||
|
|
||||||
trouble.Visibility = Visibility.Visible;
|
trouble.Visibility = Visibility.Visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
State = LoadingState.Error;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Block()
|
public void Block()
|
||||||
@@ -60,6 +65,8 @@ namespace FoxTube
|
|||||||
wifiTrouble.Visibility = Visibility.Collapsed;
|
wifiTrouble.Visibility = Visibility.Collapsed;
|
||||||
|
|
||||||
blockIcon.Visibility = Visibility.Visible;
|
blockIcon.Visibility = Visibility.Visible;
|
||||||
|
|
||||||
|
State = LoadingState.Blocked;
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void openWifi_Click(object sender, RoutedEventArgs e)
|
private async void openWifi_Click(object sender, RoutedEventArgs e)
|
||||||
@@ -90,11 +97,15 @@ namespace FoxTube
|
|||||||
trouble.Visibility = Visibility.Collapsed;
|
trouble.Visibility = Visibility.Collapsed;
|
||||||
wifiTrouble.Visibility = Visibility.Collapsed;
|
wifiTrouble.Visibility = Visibility.Collapsed;
|
||||||
blockIcon.Visibility = Visibility.Collapsed;
|
blockIcon.Visibility = Visibility.Collapsed;
|
||||||
|
|
||||||
|
State = LoadingState.Loadnig;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Close()
|
public void Close()
|
||||||
{
|
{
|
||||||
Visibility = Visibility.Collapsed;
|
Visibility = Visibility.Collapsed;
|
||||||
|
|
||||||
|
State = LoadingState.Loaded;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -506,32 +506,35 @@ namespace FoxTube
|
|||||||
} },
|
} },
|
||||||
{ typeof(ChannelPage), () =>
|
{ typeof(ChannelPage), () =>
|
||||||
{
|
{
|
||||||
if((content.Content as ChannelPage).channelId == SecretsVault.AccountId)
|
if(SecretsVault.IsAuthorized)
|
||||||
{
|
{
|
||||||
if(nav.SelectedItem != toChannel)
|
if((content.Content as ChannelPage).channelId == SecretsVault.AccountId)
|
||||||
nav.SelectedItem = toChannel;
|
|
||||||
else
|
|
||||||
s = Sender.None;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
bool b = false;
|
|
||||||
for(int k = 0; k < SecretsVault.Subscriptions.Count && k < 10; k++)
|
|
||||||
if(SecretsVault.Subscriptions[k].Snippet.ResourceId.ChannelId == (content.Content as ChannelPage).channelId)
|
|
||||||
{
|
|
||||||
if(nav.SelectedItem != nav.MenuItems[k + 9])
|
|
||||||
nav.SelectedItem = nav.MenuItems[k + 9];
|
|
||||||
else
|
|
||||||
s = Sender.None;
|
|
||||||
b = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!b)
|
|
||||||
{
|
{
|
||||||
nav.SelectedItem = null;
|
if(nav.SelectedItem != toChannel)
|
||||||
|
nav.SelectedItem = toChannel;
|
||||||
|
else
|
||||||
|
s = Sender.None;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
bool found = false;
|
||||||
|
for(int k = 0; k < SecretsVault.Subscriptions.Count && k < 10; k++)
|
||||||
|
if(SecretsVault.Subscriptions[k].Snippet.ResourceId.ChannelId == (content.Content as ChannelPage).channelId)
|
||||||
|
{
|
||||||
|
if(nav.SelectedItem != nav.MenuItems[k + 9])
|
||||||
|
nav.SelectedItem = nav.MenuItems[k + 9];
|
||||||
|
else
|
||||||
|
s = Sender.None;
|
||||||
|
found = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!found)
|
||||||
|
nav.SelectedItem = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
nav.SelectedItem = null;
|
||||||
} },
|
} },
|
||||||
{ typeof(PlaylistPage), () =>
|
{ typeof(PlaylistPage), () =>
|
||||||
{
|
{
|
||||||
@@ -599,10 +602,14 @@ namespace FoxTube
|
|||||||
else
|
else
|
||||||
nav.IsBackEnabled = false;
|
nav.IsBackEnabled = false;
|
||||||
|
|
||||||
if ((e.SourcePageType == typeof(Home) || e.SourcePageType == typeof(Settings)) && nav.DisplayMode == NavigationViewDisplayMode.Expanded)
|
if (e.SourcePageType == typeof(Home) || e.SourcePageType == typeof(Settings) || e.SourcePageType == typeof(Subscriptions))
|
||||||
nav.IsPaneOpen = true;
|
{
|
||||||
|
nav.ExpandedModeThresholdWidth = 1008;
|
||||||
|
if (nav.DisplayMode == NavigationViewDisplayMode.Expanded)
|
||||||
|
nav.IsPaneOpen = true;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
nav.IsPaneOpen = false;
|
nav.ExpandedModeThresholdWidth = int.MaxValue;
|
||||||
|
|
||||||
if (videoPlaceholder.Content != null && (videoPlaceholder.Parent as DropShadowPanel).HorizontalAlignment == HorizontalAlignment.Stretch)
|
if (videoPlaceholder.Content != null && (videoPlaceholder.Parent as DropShadowPanel).HorizontalAlignment == HorizontalAlignment.Stretch)
|
||||||
MinimizeAsInitializer();
|
MinimizeAsInitializer();
|
||||||
@@ -618,7 +625,10 @@ namespace FoxTube
|
|||||||
if (videoPlaceholder.Content != null)
|
if (videoPlaceholder.Content != null)
|
||||||
{
|
{
|
||||||
DropShadowPanel panel = videoPlaceholder.Parent as DropShadowPanel;
|
DropShadowPanel panel = videoPlaceholder.Parent as DropShadowPanel;
|
||||||
if (panel.HorizontalAlignment == HorizontalAlignment.Stretch)
|
|
||||||
|
if ((videoPlaceholder.Content as VideoPage).loading.State != LoadingState.Loaded)
|
||||||
|
CloseVideo();
|
||||||
|
else if (panel.HorizontalAlignment == HorizontalAlignment.Stretch)
|
||||||
MinimizeAsInitializer();
|
MinimizeAsInitializer();
|
||||||
else
|
else
|
||||||
content.GoBack();
|
content.GoBack();
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ namespace FoxTube.Pages
|
|||||||
|
|
||||||
public VideoPlayer player;
|
public VideoPlayer player;
|
||||||
public CommentsPage comments;
|
public CommentsPage comments;
|
||||||
LoadingPage loading;
|
public LoadingPage loading;
|
||||||
|
|
||||||
public VideoPage()
|
public VideoPage()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user