diff --git a/.gitignore b/.gitignore index 3c4efe2..e65de46 100644 --- a/.gitignore +++ b/.gitignore @@ -258,4 +258,5 @@ paket-files/ # Python Tools for Visual Studio (PTVS) __pycache__/ -*.pyc \ No newline at end of file +*.pyc +/Src/Trailer diff --git a/FoxTube/App.xaml.cs b/FoxTube/App.xaml.cs index 4acf069..e3fc7c4 100644 --- a/FoxTube/App.xaml.cs +++ b/FoxTube/App.xaml.cs @@ -57,7 +57,7 @@ namespace FoxTube public async void CheckVersion() { PackageVersion ver = Package.Current.Id.Version; - if (SettingsStorage.Version != $"{ver.Major}.{ver.Minor}") + if (SettingsStorage.Version != $"{ver.Major}.{ver.Minor}.{ver.Build}") { try { @@ -68,7 +68,7 @@ namespace FoxTube ToastNotificationManager.CreateToastNotifier().Show(Background.Notification.GetChangelogToast(e.GetAttribute("version"))); - SettingsStorage.Version = $"{ver.Major}.{ver.Minor}"; + SettingsStorage.Version = $"{ver.Major}.{ver.Minor}.{ver.Build}"; } catch { diff --git a/FoxTube/Assets/Data/Patchnotes.xml b/FoxTube/Assets/Data/Patchnotes.xml index 3052bc7..e27240e 100644 --- a/FoxTube/Assets/Data/Patchnotes.xml +++ b/FoxTube/Assets/Data/Patchnotes.xml @@ -1,6 +1,22 @@  - + + + ##[Patch #1] +### What's new: +- In-video advert now doesn't appear on minimized playback +- Fixed small header appearing on channel page +- Fixed home page loading after in long active sessions + + ##[Патч #1] +### Что нового: +- Теперь реклама в видео не появляется в компактном режиме +- Исправлено появление меленького заголовка на странице канала +- Исправлено отображение видео на домашней странице при долгой активной сессии + + + + ##[Final pre-release version] ### What's new: @@ -70,7 +86,7 @@ This is the final pre-release minor version. That means that until 1.0 release t - Fixed header titles - Some items were moved from menu to header - Added "Share" button to video cards -- Added "Delete video from playlist" button to video cards on playlist page\ +- Added "Delete video from playlist" button to video cards on playlist page - Improved channel cover quality - If available, shows localized titles and descriptions (based on "Search relevance language" parameter set in settings) - Updated russian localization diff --git a/FoxTube/Classes/SecretsVault.cs b/FoxTube/Classes/SecretsVault.cs index 8bd72a4..7065056 100644 --- a/FoxTube/Classes/SecretsVault.cs +++ b/FoxTube/Classes/SecretsVault.cs @@ -61,6 +61,11 @@ namespace FoxTube #endregion #region Methods + public static void RefreshToken() + { + Credential?.RefreshTokenAsync(CancellationToken.None); + } + /// /// Subscribes or unsibscribes authorized user from the channel /// diff --git a/FoxTube/Controls/Player/PlayerControls.cs b/FoxTube/Controls/Player/PlayerControls.cs index 53d5e5c..79f0eb5 100644 --- a/FoxTube/Controls/Player/PlayerControls.cs +++ b/FoxTube/Controls/Player/PlayerControls.cs @@ -518,5 +518,11 @@ namespace FoxTube quality.SelectedIndex = 0; } } + + public void PushAdvert() + { + if(State == PlayerDisplayState.Normal) + Advert.PushAdvert(); + } } } diff --git a/FoxTube/Controls/Player/VideoPlayer.xaml.cs b/FoxTube/Controls/Player/VideoPlayer.xaml.cs index 6385e29..7789a52 100644 --- a/FoxTube/Controls/Player/VideoPlayer.xaml.cs +++ b/FoxTube/Controls/Player/VideoPlayer.xaml.cs @@ -6,20 +6,6 @@ using Google.Apis.YouTube.v3.Data; using Windows.UI.Xaml.Media.Imaging; using Windows.Media; using Windows.Storage.Streams; -using YoutubeExplode.Models.MediaStreams; -using YoutubeExplode; -using System.IO; -using FoxTube.Classes; -using Windows.Media.Core; -using System.Linq; -using Windows.Media.Playback; -using System.Threading.Tasks; -using Windows.Media.Editing; -using Windows.Storage.Pickers; -using Windows.Storage; -using Windows.Media.MediaProperties; -using FoxTube.Controls.Player; -using System.Diagnostics; using Windows.UI.Xaml.Media; namespace FoxTube @@ -180,7 +166,7 @@ namespace FoxTube private void VideoSource_MarkerReached(object sender, TimelineMarkerRoutedEventArgs e) { - Controls.Advert.PushAdvert(); + Controls.PushAdvert(); } } } diff --git a/FoxTube/Pages/ChannelPage.xaml b/FoxTube/Pages/ChannelPage.xaml index 7bb72f4..9dbc80e 100644 --- a/FoxTube/Pages/ChannelPage.xaml +++ b/FoxTube/Pages/ChannelPage.xaml @@ -12,10 +12,10 @@ - + - + diff --git a/FoxTube/Pages/ChannelPage.xaml.cs b/FoxTube/Pages/ChannelPage.xaml.cs index 5c108a9..d4d1a2b 100644 --- a/FoxTube/Pages/ChannelPage.xaml.cs +++ b/FoxTube/Pages/ChannelPage.xaml.cs @@ -259,15 +259,9 @@ namespace FoxTube.Pages Rect view = new Rect(0.0, 0.0, videoScroll.ActualWidth, videoScroll.ActualHeight); if (view.Contains(new Point(panel.Left, panel.Bottom))) - { - if (ColapsedHeader.Opacity == 1) - hideHeader.Begin(); - } + hideHeader.Begin(); else - { - if (ColapsedHeader.Opacity == 0) - showHeader.Begin(); - } + showHeader.Begin(); } private void Refresh_Click(object sender, RoutedEventArgs e) diff --git a/FoxTube/Pages/Home.xaml.cs b/FoxTube/Pages/Home.xaml.cs index 85bbcc3..6c83b48 100644 --- a/FoxTube/Pages/Home.xaml.cs +++ b/FoxTube/Pages/Home.xaml.cs @@ -27,6 +27,7 @@ namespace FoxTube public Home() { InitializeComponent(); + SecretsVault.RefreshToken(); Initialize(); } diff --git a/FoxTube/Themes/Resources.xaml b/FoxTube/Themes/Resources.xaml index 92cd39a..7680735 100644 --- a/FoxTube/Themes/Resources.xaml +++ b/FoxTube/Themes/Resources.xaml @@ -41,6 +41,6 @@ - 0:0:0.5 + 0:0:0.3