Archived
1
0

Merged PR 28: 1.0 release

- Special thanks block
- Fixed dev messages inbox
- Activated live ads
- Updated version to 1.0
- Added play/pause on player click
- Added player hotkeys
- Fixed dev toasts
- Fixed crash on video zero rating
- Fixed visible subscribe button on own videos
- Updated changelog
- Updated project config
This commit is contained in:
Michael Gordeev
2019-05-31 19:16:00 +00:00
13 changed files with 99 additions and 19 deletions
+19 -3
View File
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<items> <items>
<item time="2019-05-21" version="0.6.2"> <item time="2019-05-21" version="1.0">
<content> <content>
<en-US>##[Patch #1] <en-US>##[Final release]
### What's new: ### What's new:
- In-video advert now doesn't appear on minimized playback - In-video advert now doesn't appear on minimized playback
- Fixed small header appearing on channel page - Fixed small header appearing on channel page
@@ -12,8 +12,16 @@
- Added backward navigation to video page - Added backward navigation to video page
- Improved authentication process - Improved authentication process
- Removed outdated logo from 'About' page and updated Twitter link - Removed outdated logo from 'About' page and updated Twitter link
- Play/pause toggle on video player mouse click
- Added player hotkeys:
Space - Play/Pause
Arrow right/left - Skip forward/backward
F11 - Toggle full screen
- Activated real ads
- Fixed app crash on video's zero rating
- "Subscribe" button now is hidden on your videos
</en-US> </en-US>
<ru-RU>##[Патч #1] <ru-RU>##[Релизная версия]
### Что нового: ### Что нового:
- Теперь реклама в видео не появляется в компактном режиме - Теперь реклама в видео не появляется в компактном режиме
- Исправлено появление меленького заголовка на странице канала - Исправлено появление меленького заголовка на странице канала
@@ -23,6 +31,14 @@
- Добавлена обратная навигация для страниц просмотра - Добавлена обратная навигация для страниц просмотра
- Улучшен процесс аутентификации - Улучшен процесс аутентификации
- Удален старый логотип с страницы 'О приложении' и обновлена ссылка на Твиттер - Удален старый логотип с страницы 'О приложении' и обновлена ссылка на Твиттер
- Пауза/воспроизведение при клике мышью по окну плеера
- Добавлены горячие клавиши:
Пробел - Пауза/Воспроизведение
Стрелка вправо/влево - Перейти вперед на 30 секунд/назад на 10 секунд
F11 - Переключить полноэкранный режим
- Запущена реальная реклама
- Исправлен вылет приложения при нулевом рейтинге видео
- Кнопка "Подписаться" теперь скрыта на странице вашего видео
</ru-RU> </ru-RU>
</content> </content>
</item> </item>
+2 -2
View File
@@ -67,10 +67,10 @@ namespace FoxTube.Classes
Id = version; Id = version;
} }
public InboxItem(string title, string content, DateTime timeStamp, string id) public InboxItem(string title, string content, DateTime timeStamp, string id, string header)
{ {
Type = InboxItemType.Default; Type = InboxItemType.Default;
Content = content; Content = header + "\n\n" + content;
Subject = title; Subject = title;
TimeStamp = timeStamp; TimeStamp = timeStamp;
Id = id; Id = id;
+1 -1
View File
@@ -44,7 +44,7 @@ namespace FoxTube
public static YouTubeService Service => IsAuthorized ? new YouTubeService(Initializer) : NoAuthService; public static YouTubeService Service => IsAuthorized ? new YouTubeService(Initializer) : NoAuthService;
public static HttpClient HttpClient { get; } = new HttpClient(); public static HttpClient HttpClient { get; } = new HttpClient();
private static bool TestAds => true; //TODO: Change this bool private static bool TestAds => false; //TODO: Change this bool
public static string AppId => TestAds ? "d25517cb-12d4-4699-8bdc-52040c712cab" : "9ncqqxjtdlfh"; public static string AppId => TestAds ? "d25517cb-12d4-4699-8bdc-52040c712cab" : "9ncqqxjtdlfh";
public static string AdUnitId => TestAds ? "test" : "1100044398"; public static string AdUnitId => TestAds ? "test" : "1100044398";
public static bool AdsDisabled { get; private set; } = true; public static bool AdsDisabled { get; private set; } = true;
+19 -4
View File
@@ -7,6 +7,7 @@ using System.Collections.Generic;
using System.Globalization; using System.Globalization;
using System.Linq; using System.Linq;
using Windows.ApplicationModel.Resources; using Windows.ApplicationModel.Resources;
using Windows.Foundation;
using Windows.Graphics.Display; using Windows.Graphics.Display;
using Windows.Media.Core; using Windows.Media.Core;
using Windows.UI.Xaml; using Windows.UI.Xaml;
@@ -69,8 +70,6 @@ namespace FoxTube
Button fwd; Button fwd;
Button bwd; Button bwd;
Button captionsMenu; Button captionsMenu;
Button settingsMenu;
Button fullscreen;
Button drag; Button drag;
TextBlock title; TextBlock title;
@@ -94,6 +93,7 @@ namespace FoxTube
Grid header; Grid header;
Grid footer; Grid footer;
Grid center; Grid center;
Grid centerTrigger;
#endregion #endregion
PlayerDisplayState State { get; set; } = PlayerDisplayState.Normal; PlayerDisplayState State { get; set; } = PlayerDisplayState.Normal;
@@ -137,6 +137,20 @@ namespace FoxTube
quality.SelectionChanged += Quality_SelectionChanged; quality.SelectionChanged += Quality_SelectionChanged;
seek.ValueChanged += Seek_ValueChanged; seek.ValueChanged += Seek_ValueChanged;
Player.Tapped += (s, e) =>
{
Rect view = new Rect(0, 0, centerTrigger.ActualWidth, centerTrigger.ActualHeight);
Point p = e.GetPosition(centerTrigger);
if (!view.Contains(p) || e.PointerDeviceType != Windows.Devices.Input.PointerDeviceType.Mouse)
return;
if (Player.CurrentState == Windows.UI.Xaml.Media.MediaElementState.Playing)
Player.Pause();
else if (Player.CurrentState == Windows.UI.Xaml.Media.MediaElementState.Paused)
Player.Play();
};
if (queue.Count > 0) if (queue.Count > 0)
foreach (Action i in queue) foreach (Action i in queue)
i(); i();
@@ -157,8 +171,6 @@ namespace FoxTube
fwd = GetTemplateChild("SkipForwardButton") as Button; fwd = GetTemplateChild("SkipForwardButton") as Button;
bwd = GetTemplateChild("SkipBackwardButton") as Button; bwd = GetTemplateChild("SkipBackwardButton") as Button;
captionsMenu = GetTemplateChild("CaptionsMenuButton") as Button; captionsMenu = GetTemplateChild("CaptionsMenuButton") as Button;
settingsMenu = GetTemplateChild("QualityMenuButton") as Button;
fullscreen = GetTemplateChild("FullWindowButton") as Button;
drag = GetTemplateChild("drag") as Button; drag = GetTemplateChild("drag") as Button;
Advert = GetTemplateChild("AdvertControl") as PlayerAdvert; Advert = GetTemplateChild("AdvertControl") as PlayerAdvert;
@@ -184,6 +196,7 @@ namespace FoxTube
header = GetTemplateChild("header") as Grid; header = GetTemplateChild("header") as Grid;
footer = GetTemplateChild("footer") as Grid; footer = GetTemplateChild("footer") as Grid;
center = GetTemplateChild("center") as Grid; center = GetTemplateChild("center") as Grid;
centerTrigger = GetTemplateChild("centerTrigger") as Grid;
} }
private void Seek_ValueChanged(object sender, RangeBaseValueChangedEventArgs e) private void Seek_ValueChanged(object sender, RangeBaseValueChangedEventArgs e)
@@ -498,6 +511,8 @@ namespace FoxTube
else else
quality.SelectedIndex = 0; quality.SelectedIndex = 0;
} }
Focus(FocusState.Programmatic);
} }
public void PushAdvert() public void PushAdvert()
+1 -1
View File
@@ -20,7 +20,7 @@
<PackageCertificateKeyFile>FoxTube_StoreKey.pfx</PackageCertificateKeyFile> <PackageCertificateKeyFile>FoxTube_StoreKey.pfx</PackageCertificateKeyFile>
<PackageCertificateThumbprint>50B93E6A246058D555BA65CD203D7A02064A7409</PackageCertificateThumbprint> <PackageCertificateThumbprint>50B93E6A246058D555BA65CD203D7A02064A7409</PackageCertificateThumbprint>
<GenerateAppInstallerFile>False</GenerateAppInstallerFile> <GenerateAppInstallerFile>False</GenerateAppInstallerFile>
<AppxAutoIncrementPackageRevision>True</AppxAutoIncrementPackageRevision> <AppxAutoIncrementPackageRevision>False</AppxAutoIncrementPackageRevision>
<AppxPackageDir>E:\XFox\Documents\FoxTube builds\0.6\</AppxPackageDir> <AppxPackageDir>E:\XFox\Documents\FoxTube builds\0.6\</AppxPackageDir>
<AppxBundle>Always</AppxBundle> <AppxBundle>Always</AppxBundle>
<AppxBundlePlatforms>x86|x64|arm</AppxBundlePlatforms> <AppxBundlePlatforms>x86|x64|arm</AppxBundlePlatforms>
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" xmlns:uap3="http://schemas.microsoft.com/appx/manifest/uap/windows10/3" IgnorableNamespaces="uap mp uap3"> <Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" xmlns:uap3="http://schemas.microsoft.com/appx/manifest/uap/windows10/3" IgnorableNamespaces="uap mp uap3">
<Identity Name="53949MichaelXFoxGordeev.FoxTube" Publisher="CN=FD7A34DD-FE4D-4D7D-9D33-2DA9EBBE7725" Version="0.6.2.0" /> <Identity Name="53949MichaelXFoxGordeev.FoxTube" Publisher="CN=FD7A34DD-FE4D-4D7D-9D33-2DA9EBBE7725" Version="1.0.0.0" />
<mp:PhoneIdentity PhoneProductId="04fd81c1-6473-4174-afd7-4ac71dd85721" PhonePublisherId="00000000-0000-0000-0000-000000000000" /> <mp:PhoneIdentity PhoneProductId="04fd81c1-6473-4174-afd7-4ac71dd85721" PhonePublisherId="00000000-0000-0000-0000-000000000000" />
<Properties> <Properties>
<DisplayName>FoxTube</DisplayName> <DisplayName>FoxTube</DisplayName>
+5
View File
@@ -12,6 +12,11 @@
<TextBlock Name="version" Text="[currentVersion]" FontSize="14" Foreground="Gray" Margin="0,-5,0,0"/> <TextBlock Name="version" Text="[currentVersion]" FontSize="14" Foreground="Gray" Margin="0,-5,0,0"/>
<TextBlock x:Uid="/About/developed" TextWrapping="WrapWholeWords" Text="Developed by Michael &#x22;XFox&#x22; Gordeev" Margin="0,10,0,0"/> <TextBlock x:Uid="/About/developed" TextWrapping="WrapWholeWords" Text="Developed by Michael &#x22;XFox&#x22; Gordeev" Margin="0,10,0,0"/>
<TextBlock x:Uid="/About/specialThanks" Text="Special thanks to:" FontSize="22" FontWeight="SemiBold" Margin="0,10,0,0"/>
<TextBlock><Hyperlink NavigateUri="https://github.com/Tyrrrz">@Tyrrrz</Hyperlink> <Run x:Uid="/About/tyrrrzThanks">for his awesome library</Run></TextBlock>
<TextBlock><Hyperlink NavigateUri="https://vk.com/msreviewnet">@msreviewnet</Hyperlink> <Run x:Uid="/About/msreviewThanks">for warm welcome and first feedback</Run></TextBlock>
<TextBlock TextWrapping="WrapWholeWords" Visibility="Collapsed" Text="Special thanks to contributors for motivating me, testers and translators for making this app better everyday and you for using this app;)" Margin="0,10,0,0"/> <TextBlock TextWrapping="WrapWholeWords" Visibility="Collapsed" Text="Special thanks to contributors for motivating me, testers and translators for making this app better everyday and you for using this app;)" Margin="0,10,0,0"/>
<TextBlock x:Uid="/About/contacts" Text="Contacts" FontSize="22" FontWeight="SemiBold" Margin="0,10,0,0"/> <TextBlock x:Uid="/About/contacts" Text="Contacts" FontSize="22" FontWeight="SemiBold" Margin="0,10,0,0"/>
+1 -1
View File
@@ -94,7 +94,7 @@
<ScrollViewer Grid.Column="1"> <ScrollViewer Grid.Column="1">
<StackPanel Margin="10"> <StackPanel Margin="10">
<TextBlock FontWeight="Bold" Text="Hello, World!" FontSize="26" Name="title"/> <TextBlock FontWeight="Bold" Text="Hello, World!" FontSize="26" Name="title"/>
<controls:MarkdownTextBlock IsTextSelectionEnabled="True" Text="Content" Name="content" Background="Transparent"/> <controls:MarkdownTextBlock LinkClicked="Content_LinkClicked" IsTextSelectionEnabled="True" Text="Content" Name="content" Background="Transparent"/>
</StackPanel> </StackPanel>
</ScrollViewer> </ScrollViewer>
<Button Grid.Column="1" VerticalAlignment="Top" HorizontalAlignment="Right" Background="Transparent" FontFamily="Segoe MDL2 Assets" Content="&#xE106;" Width="50" Height="50" Name="close" Click="close_Click"/> <Button Grid.Column="1" VerticalAlignment="Top" HorizontalAlignment="Right" Background="Transparent" FontFamily="Segoe MDL2 Assets" Content="&#xE106;" Width="50" Height="50" Name="close" Click="close_Click"/>
+10 -3
View File
@@ -16,7 +16,7 @@ namespace FoxTube.Pages.SettingsPages
/// </summary> /// </summary>
public sealed partial class Inbox : Page public sealed partial class Inbox : Page
{ {
readonly List<InboxItem> items = new List<InboxItem>(); List<InboxItem> items = new List<InboxItem>();
public Inbox() public Inbox()
{ {
@@ -43,7 +43,8 @@ namespace FoxTube.Pages.SettingsPages
e["header"][SettingsStorage.Language].InnerText, e["header"][SettingsStorage.Language].InnerText,
e["content"][SettingsStorage.Language].InnerText, e["content"][SettingsStorage.Language].InnerText,
DateTime.Parse(e.GetAttribute("time")), DateTime.Parse(e.GetAttribute("time")),
e["id"].InnerText)); e["id"].InnerText,
e["contentHeader"].InnerText));
} }
catch (Exception e) catch (Exception e)
{ {
@@ -54,7 +55,7 @@ namespace FoxTube.Pages.SettingsPages
}); });
} }
items.OrderBy(item => item.TimeStamp); items = items.OrderBy(item => item.TimeStamp).Reverse().ToList();
items.ForEach(i => list.Items.Add(i)); items.ForEach(i => list.Items.Add(i));
if (!string.IsNullOrWhiteSpace(id)) if (!string.IsNullOrWhiteSpace(id))
@@ -67,6 +68,7 @@ namespace FoxTube.Pages.SettingsPages
return; return;
list.Items.Clear(); list.Items.Clear();
CloseView();
switch (filter.SelectedIndex) switch (filter.SelectedIndex)
{ {
@@ -131,5 +133,10 @@ namespace FoxTube.Pages.SettingsPages
if (e.NewState == null) if (e.NewState == null)
CloseView(); CloseView();
} }
private void Content_LinkClicked(object sender, Microsoft.Toolkit.Uwp.UI.Controls.LinkClickedEventArgs e)
{
Methods.ProcessLink(e.Link);
}
} }
} }
+4 -1
View File
@@ -260,7 +260,8 @@ namespace FoxTube.Pages
//Setting ratings //Setting ratings
dislikes.Text = $"{item.Statistics.DislikeCount:0,0}"; dislikes.Text = $"{item.Statistics.DislikeCount:0,0}";
likes.Text = $"{item.Statistics.LikeCount:0,0}"; likes.Text = $"{item.Statistics.LikeCount:0,0}";
rating.Value = (double)item.Statistics.DislikeCount / (double)(item.Statistics.DislikeCount + item.Statistics.LikeCount) * 100; try { rating.Value = (double)item.Statistics.DislikeCount / (double)(item.Statistics.DislikeCount + item.Statistics.LikeCount) * 100; }
catch { rating.Visibility = Visibility.Collapsed; }
//Setting User's rate //Setting User's rate
if (SecretsVault.IsAuthorized) if (SecretsVault.IsAuthorized)
@@ -283,6 +284,8 @@ namespace FoxTube.Pages
subscribe.Foreground = new SolidColorBrush(Colors.Gray); subscribe.Foreground = new SolidColorBrush(Colors.Gray);
subscribe.Content = resources.GetString("/Cards/unsubscribe"); subscribe.Content = resources.GetString("/Cards/unsubscribe");
} }
if (item.Snippet.ChannelId == SecretsVault.AccountId)
subscribe.Visibility = Visibility.Collapsed;
} }
else else
{ {
+9
View File
@@ -141,18 +141,27 @@
<data name="legal.Text" xml:space="preserve"> <data name="legal.Text" xml:space="preserve">
<value>Legal stuff</value> <value>Legal stuff</value>
</data> </data>
<data name="msreviewThanks.Text" xml:space="preserve">
<value>for warm welcome and first feedback!</value>
</data>
<data name="myBlog.Text" xml:space="preserve"> <data name="myBlog.Text" xml:space="preserve">
<value>My website</value> <value>My website</value>
</data> </data>
<data name="ourPrivacy.Content" xml:space="preserve"> <data name="ourPrivacy.Content" xml:space="preserve">
<value>Our Privacy Policy</value> <value>Our Privacy Policy</value>
</data> </data>
<data name="specialThanks.Text" xml:space="preserve">
<value>Special thanks to:</value>
</data>
<data name="terms.Content" xml:space="preserve"> <data name="terms.Content" xml:space="preserve">
<value>YouTube Terms of use</value> <value>YouTube Terms of use</value>
</data> </data>
<data name="twitter.Text" xml:space="preserve"> <data name="twitter.Text" xml:space="preserve">
<value>Twitter</value> <value>Twitter</value>
</data> </data>
<data name="tyrrrzThanks.Text" xml:space="preserve">
<value>for his awesome library!</value>
</data>
<data name="vk.Text" xml:space="preserve"> <data name="vk.Text" xml:space="preserve">
<value>Vkontakte</value> <value>Vkontakte</value>
</data> </data>
+9
View File
@@ -141,18 +141,27 @@
<data name="legal.Text" xml:space="preserve"> <data name="legal.Text" xml:space="preserve">
<value>Юридический материал</value> <value>Юридический материал</value>
</data> </data>
<data name="msreviewThanks.Text" xml:space="preserve">
<value>за теплый прием и первый отзыв!</value>
</data>
<data name="myBlog.Text" xml:space="preserve"> <data name="myBlog.Text" xml:space="preserve">
<value>Мой веб-сайт</value> <value>Мой веб-сайт</value>
</data> </data>
<data name="ourPrivacy.Content" xml:space="preserve"> <data name="ourPrivacy.Content" xml:space="preserve">
<value>Наша политика конфиденциальности</value> <value>Наша политика конфиденциальности</value>
</data> </data>
<data name="specialThanks.Text" xml:space="preserve">
<value>Отдельная благодарность:</value>
</data>
<data name="terms.Content" xml:space="preserve"> <data name="terms.Content" xml:space="preserve">
<value>Правила использования YouTube</value> <value>Правила использования YouTube</value>
</data> </data>
<data name="twitter.Text" xml:space="preserve"> <data name="twitter.Text" xml:space="preserve">
<value>Твиттер</value> <value>Твиттер</value>
</data> </data>
<data name="tyrrrzThanks.Text" xml:space="preserve">
<value>за его очень крутую библиотеку!</value>
</data>
<data name="vk.Text" xml:space="preserve"> <data name="vk.Text" xml:space="preserve">
<value>ВКонтакте</value> <value>ВКонтакте</value>
</data> </data>
+18 -2
View File
@@ -264,6 +264,8 @@
</StackPanel> </StackPanel>
</Grid> </Grid>
<Grid x:Name="centerTrigger" Grid.Row="1"/>
<Grid x:Name="center" Grid.Row="1" Visibility="Collapsed" Background="#7F000000"> <Grid x:Name="center" Grid.Row="1" Visibility="Collapsed" Background="#7F000000">
<Button x:Name="drag" IsHitTestVisible="False" Height="32" Width="47" Margin="0,0,47,0" Content="&#xE700;" Visibility="Collapsed" Padding="0" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" VerticalAlignment="Top" HorizontalAlignment="Right"/> <Button x:Name="drag" IsHitTestVisible="False" Height="32" Width="47" Margin="0,0,47,0" Content="&#xE700;" Visibility="Collapsed" Padding="0" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" VerticalAlignment="Top" HorizontalAlignment="Right"/>
<StackPanel x:Name="centerControls" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center"/> <StackPanel x:Name="centerControls" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center"/>
@@ -288,6 +290,9 @@
<StackPanel x:Name="LeftFooterControls" Orientation="Horizontal" VerticalAlignment="Bottom"> <StackPanel x:Name="LeftFooterControls" Orientation="Horizontal" VerticalAlignment="Bottom">
<Button x:Name="PlayPauseButton"> <Button x:Name="PlayPauseButton">
<SymbolIcon x:Name="PlayPauseSymbol" Symbol="Play"/> <SymbolIcon x:Name="PlayPauseSymbol" Symbol="Play"/>
<Button.KeyboardAccelerators>
<KeyboardAccelerator Key="Space"/>
</Button.KeyboardAccelerators>
</Button> </Button>
<Button x:Name="NextButton" Content="&#xE101;"/> <Button x:Name="NextButton" Content="&#xE101;"/>
<Button x:Name="VolumeMenuButton" Content="&#xE15D;"> <Button x:Name="VolumeMenuButton" Content="&#xE15D;">
@@ -316,8 +321,16 @@
</Grid> </Grid>
<StackPanel x:Name="RightFooterControls" Grid.Column="2" VerticalAlignment="Bottom" Orientation="Horizontal"> <StackPanel x:Name="RightFooterControls" Grid.Column="2" VerticalAlignment="Bottom" Orientation="Horizontal">
<Button x:Name="SkipBackwardButton" Content="&#xED3C;"/> <Button x:Name="SkipBackwardButton" Content="&#xED3C;">
<Button x:Name="SkipForwardButton" Content="&#xED3D;"/> <Button.KeyboardAccelerators>
<KeyboardAccelerator Key="Left"/>
</Button.KeyboardAccelerators>
</Button>
<Button x:Name="SkipForwardButton" Content="&#xED3D;">
<Button.KeyboardAccelerators>
<KeyboardAccelerator Key="Right"/>
</Button.KeyboardAccelerators>
</Button>
<Line Stroke="White" StrokeThickness="2" Y1="5" Y2="45"/> <Line Stroke="White" StrokeThickness="2" Y1="5" Y2="45"/>
<Button x:Name="CaptionsMenuButton" Content="&#xE7F0;"> <Button x:Name="CaptionsMenuButton" Content="&#xE7F0;">
<Button.Flyout> <Button.Flyout>
@@ -338,6 +351,9 @@
</Button> </Button>
<Button x:Name="FullWindowButton"> <Button x:Name="FullWindowButton">
<SymbolIcon x:Name="FullWindowSymbol" Symbol="FullScreen"/> <SymbolIcon x:Name="FullWindowSymbol" Symbol="FullScreen"/>
<Button.KeyboardAccelerators>
<KeyboardAccelerator Key="F11"/>
</Button.KeyboardAccelerators>
</Button> </Button>
</StackPanel> </StackPanel>
</Grid> </Grid>