Merge pull request #73 from mateuszskoczek/features/subscriptions

Features/subscriptions
This commit is contained in:
2024-03-09 20:44:59 +01:00
committed by GitHub
Unverified
58 changed files with 929 additions and 157 deletions

View File

@@ -126,4 +126,7 @@
<data name="HomeNavigationViewItem" xml:space="preserve"> <data name="HomeNavigationViewItem" xml:space="preserve">
<value>Home</value> <value>Home</value>
</data> </data>
<data name="SubscriptionsNavigationViewItem" xml:space="preserve">
<value>Subscriptions</value>
</data>
</root> </root>

View File

@@ -159,4 +159,7 @@
<data name="StartAtMeteredConnectionDialogTitle" xml:space="preserve"> <data name="StartAtMeteredConnectionDialogTitle" xml:space="preserve">
<value>Warning</value> <value>Warning</value>
</data> </data>
<data name="SubscriptionVideoListName" xml:space="preserve">
<value>Subscriptions</value>
</data>
</root> </root>

View File

@@ -132,6 +132,12 @@
<data name="OptionBarMessageLoading" xml:space="preserve"> <data name="OptionBarMessageLoading" xml:space="preserve">
<value>Loading...</value> <value>Loading...</value>
</data> </data>
<data name="OptionBarMessageVideosFound" xml:space="preserve">
<value>New videos:</value>
</data>
<data name="OptionBarMessageVideosNotFound" xml:space="preserve">
<value>No new videos</value>
</data>
<data name="OptionBarPlaylistSearch.Label" xml:space="preserve"> <data name="OptionBarPlaylistSearch.Label" xml:space="preserve">
<value>Playlist search</value> <value>Playlist search</value>
</data> </data>

View File

@@ -0,0 +1,138 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="DuplicateError" xml:space="preserve">
<value>Playlist has been already added</value>
</data>
<data name="ErrorInfoBar.Title" xml:space="preserve">
<value>Error</value>
</data>
<data name="Header.Text" xml:space="preserve">
<value>Subscriptions</value>
</data>
<data name="PlaylistSearchButton.Content" xml:space="preserve">
<value>Add</value>
</data>
<data name="PlaylistUrlTextBox.PlaceholderText" xml:space="preserve">
<value>Playlist URL</value>
</data>
<data name="RemovePlaylistButton.Content" xml:space="preserve">
<value>Remove</value>
</data>
</root>

View File

@@ -13,6 +13,7 @@ using VDownload.Services.UI.DictionaryResources;
using VDownload.Services.UI.StringResources; using VDownload.Services.UI.StringResources;
using SimpleToolkit.UI.Models; using SimpleToolkit.UI.Models;
using VDownload.Core.ViewModels.About; using VDownload.Core.ViewModels.About;
using VDownload.Core.ViewModels.Subscriptions;
namespace VDownload.Core.ViewModels namespace VDownload.Core.ViewModels
{ {
@@ -66,7 +67,13 @@ namespace VDownload.Core.ViewModels
Name = _stringResourcesService.BaseViewResources.Get("HomeNavigationViewItem"), Name = _stringResourcesService.BaseViewResources.Get("HomeNavigationViewItem"),
IconSource = _dictionaryResourcesService.Get<string>("ImageBaseViewHome"), IconSource = _dictionaryResourcesService.Get<string>("ImageBaseViewHome"),
ViewModel = typeof(HomeViewModel), ViewModel = typeof(HomeViewModel),
} },
new NavigationViewItem()
{
Name = _stringResourcesService.BaseViewResources.Get("SubscriptionsNavigationViewItem"),
IconSource = _dictionaryResourcesService.Get<string>("ImageBaseViewSubscriptions"),
ViewModel = typeof(SubscriptionsViewModel),
},
} }
); );
FooterItems = new ReadOnlyObservableCollection<NavigationViewItem> FooterItems = new ReadOnlyObservableCollection<NavigationViewItem>

View File

@@ -24,7 +24,7 @@ using VDownload.Services.Data.Application;
namespace VDownload.Core.ViewModels.Home namespace VDownload.Core.ViewModels.Home
{ {
public partial class HomePlaylistViewModel : ObservableObject public partial class HomeVideoCollectionViewModel : ObservableObject
{ {
#region SERVICES #region SERVICES
@@ -43,7 +43,7 @@ namespace VDownload.Core.ViewModels.Home
#region FIELDS #region FIELDS
protected Playlist _playlist; protected VideoCollection _collection;
protected List<VideoViewModel> _removedVideos; protected List<VideoViewModel> _removedVideos;
@@ -181,7 +181,7 @@ namespace VDownload.Core.ViewModels.Home
#region CONSTRUCTORS #region CONSTRUCTORS
public HomePlaylistViewModel(IDownloadTaskManager tasksManager, ISettingsService settingsService, IStoragePickerService storagePickerService, IFilenameService filenameService, IDialogsService dialogsService, IStringResourcesService stringResourcesService, IApplicationDataService applicationDataService) public HomeVideoCollectionViewModel(IDownloadTaskManager tasksManager, ISettingsService settingsService, IStoragePickerService storagePickerService, IFilenameService filenameService, IDialogsService dialogsService, IStringResourcesService stringResourcesService, IApplicationDataService applicationDataService)
{ {
_tasksManager = tasksManager; _tasksManager = tasksManager;
_settingsService = settingsService; _settingsService = settingsService;
@@ -202,10 +202,10 @@ namespace VDownload.Core.ViewModels.Home
#region PUBLIC METHODS #region PUBLIC METHODS
public void LoadPlaylist(Playlist playlist) public void LoadCollection(VideoCollection collection)
{ {
_playlist = playlist; _collection = collection;
ParallelQuery<Video> playlistQuery = playlist.AsParallel(); ParallelQuery<Video> playlistQuery = _collection.AsParallel();
_removedVideos.Clear(); _removedVideos.Clear();
@@ -218,7 +218,7 @@ namespace VDownload.Core.ViewModels.Home
_minViewsFilter = MinViews; _minViewsFilter = MinViews;
_maxViewsFilter = MaxViews; _maxViewsFilter = MaxViews;
IEnumerable<DateTimeOffset> date = playlist.Select(x => new DateTimeOffset(x.PublishDate)); IEnumerable<DateTimeOffset> date = _collection.Select(x => new DateTimeOffset(x.PublishDate));
MinDate = date.Min(); MinDate = date.Min();
MaxDate = date.Max(); MaxDate = date.Max();
_minDateFilter = MinDate; _minDateFilter = MinDate;
@@ -230,9 +230,9 @@ namespace VDownload.Core.ViewModels.Home
_minDurationFilter = MinDuration; _minDurationFilter = MinDuration;
_maxDurationFilter = MaxDuration; _maxDurationFilter = MaxDuration;
Name = _playlist.Name; Name = _collection.Name;
Videos.Clear(); Videos.Clear();
foreach (Video video in playlist) foreach (Video video in _collection)
{ {
Videos.Add(new VideoViewModel(video, _settingsService, _storagePickerService, _filenameService, _applicationDataService), true); Videos.Add(new VideoViewModel(video, _settingsService, _storagePickerService, _filenameService, _applicationDataService), true);
} }

View File

@@ -10,6 +10,7 @@ using VDownload.Core.Tasks;
using VDownload.Models; using VDownload.Models;
using VDownload.Services.Data.Configuration; using VDownload.Services.Data.Configuration;
using VDownload.Services.Data.Settings; using VDownload.Services.Data.Settings;
using VDownload.Services.Data.Subscriptions;
using VDownload.Services.UI.Dialogs; using VDownload.Services.UI.Dialogs;
using VDownload.Services.UI.StringResources; using VDownload.Services.UI.StringResources;
using VDownload.Sources; using VDownload.Sources;
@@ -52,12 +53,13 @@ namespace VDownload.Core.ViewModels.Home
protected readonly ISettingsService _settingsService; protected readonly ISettingsService _settingsService;
protected readonly IStringResourcesService _stringResourcesService; protected readonly IStringResourcesService _stringResourcesService;
protected readonly ISearchService _searchService; protected readonly ISearchService _searchService;
protected readonly ISubscriptionsDataService _subscriptionsDataService;
protected readonly IDialogsService _dialogsService; protected readonly IDialogsService _dialogsService;
protected readonly IDownloadTaskManager _downloadTaskManager; protected readonly IDownloadTaskManager _downloadTaskManager;
protected readonly HomeVideoViewModel _videoViewModel; protected readonly HomeVideoViewModel _videoViewModel;
protected readonly HomePlaylistViewModel _playlistViewModel; protected readonly HomeVideoCollectionViewModel _videoCollectionViewModel;
#endregion #endregion
@@ -67,7 +69,7 @@ namespace VDownload.Core.ViewModels.Home
protected readonly Type _downloadsView = typeof(HomeDownloadsViewModel); protected readonly Type _downloadsView = typeof(HomeDownloadsViewModel);
protected readonly Type _videoView = typeof(HomeVideoViewModel); protected readonly Type _videoView = typeof(HomeVideoViewModel);
protected readonly Type _playlistView = typeof(HomePlaylistViewModel); protected readonly Type _videoCollectionView = typeof(HomeVideoCollectionViewModel);
#endregion #endregion
@@ -88,6 +90,9 @@ namespace VDownload.Core.ViewModels.Home
[ObservableProperty] [ObservableProperty]
private OptionBarMessageIconType _optionBarMessageIcon; private OptionBarMessageIconType _optionBarMessageIcon;
[ObservableProperty]
private bool _optionBarLoadSubscriptionButtonChecked;
[ObservableProperty] [ObservableProperty]
private bool _optionBarVideoSearchButtonChecked; private bool _optionBarVideoSearchButtonChecked;
@@ -112,12 +117,13 @@ namespace VDownload.Core.ViewModels.Home
#region CONSTRUCTORS #region CONSTRUCTORS
public HomeViewModel(IConfigurationService configurationService, ISettingsService settingsService, IStringResourcesService stringResourcesService, ISearchService searchService, IDialogsService dialogsService, IDownloadTaskManager downloadTaskManager, HomeVideoViewModel videoViewModel, HomePlaylistViewModel playlistViewModel) public HomeViewModel(IConfigurationService configurationService, ISettingsService settingsService, IStringResourcesService stringResourcesService, ISearchService searchService, ISubscriptionsDataService subscriptionsDataService, IDialogsService dialogsService, IDownloadTaskManager downloadTaskManager, HomeVideoViewModel videoViewModel, HomeVideoCollectionViewModel videoCollectionViewModel)
{ {
_configurationService = configurationService; _configurationService = configurationService;
_settingsService = settingsService; _settingsService = settingsService;
_stringResourcesService = stringResourcesService; _stringResourcesService = stringResourcesService;
_searchService = searchService; _searchService = searchService;
_subscriptionsDataService = subscriptionsDataService;
_dialogsService = dialogsService; _dialogsService = dialogsService;
_downloadTaskManager = downloadTaskManager; _downloadTaskManager = downloadTaskManager;
@@ -125,8 +131,8 @@ namespace VDownload.Core.ViewModels.Home
_videoViewModel = videoViewModel; _videoViewModel = videoViewModel;
_videoViewModel.CloseRequested += BackToDownload_EventHandler; _videoViewModel.CloseRequested += BackToDownload_EventHandler;
_playlistViewModel = playlistViewModel; _videoCollectionViewModel = videoCollectionViewModel;
_playlistViewModel.CloseRequested += BackToDownload_EventHandler; _videoCollectionViewModel.CloseRequested += BackToDownload_EventHandler;
} }
#endregion #endregion
@@ -145,6 +151,7 @@ namespace VDownload.Core.ViewModels.Home
OptionBarContent = OptionBarContentType.None; OptionBarContent = OptionBarContentType.None;
OptionBarMessageIcon = OptionBarMessageIconType.None; OptionBarMessageIcon = OptionBarMessageIconType.None;
OptionBarMessage = null; OptionBarMessage = null;
OptionBarLoadSubscriptionButtonChecked = false;
OptionBarVideoSearchButtonChecked = false; OptionBarVideoSearchButtonChecked = false;
OptionBarPlaylistSearchButtonChecked = false; OptionBarPlaylistSearchButtonChecked = false;
OptionBarSearchNotPending = true; OptionBarSearchNotPending = true;
@@ -154,16 +161,64 @@ namespace VDownload.Core.ViewModels.Home
} }
[RelayCommand] [RelayCommand]
public void LoadFromSubscription() public async Task LoadFromSubscription()
{ {
MainContent = _downloadsView; MainContent = _downloadsView;
OptionBarMessageIcon = OptionBarMessageIconType.None;
OptionBarMessage = null;
OptionBarContent = OptionBarContentType.None; if (OptionBarLoadSubscriptionButtonChecked)
OptionBarVideoSearchButtonChecked = false; {
OptionBarPlaylistSearchButtonChecked = false; OptionBarContent = OptionBarContentType.None;
OptionBarSearchNotPending = false; OptionBarVideoSearchButtonChecked = false;
OptionBarPlaylistSearchButtonChecked = false;
//TODO: Load videos OptionBarSearchNotPending = false;
OptionBarMessageIcon = OptionBarMessageIconType.ProgressRing;
OptionBarMessage = _stringResourcesService.HomeViewResources.Get("OptionBarMessageLoading");
SubscriptionsVideoList subList = new SubscriptionsVideoList { Name = _stringResourcesService.CommonResources.Get("SubscriptionVideoListName") };
List<Task> tasks = new List<Task>();
foreach (Subscription sub in _subscriptionsDataService.Data.ToArray())
{
tasks.Add(Task.Run(async () =>
{
Playlist playlist;
try
{
playlist = await _searchService.SearchPlaylist(sub.Url.OriginalString, 0);
}
catch (MediaSearchException)
{
return;
}
IEnumerable<Video> newIds = playlist.Where(x => !sub.VideoIds.Contains(x.Id));
subList.AddRange(newIds);
foreach (Video video in newIds)
{
sub.VideoIds.Add(video.Id);
}
}));
}
await Task.WhenAll(tasks);
await _subscriptionsDataService.Save();
if (subList.Count > 0)
{
OptionBarMessage = $"{_stringResourcesService.HomeViewResources.Get("OptionBarMessageVideosFound")} {subList.Count}";
_videoCollectionViewModel.LoadCollection(subList);
MainContent = _videoCollectionView;
}
else
{
OptionBarMessage = _stringResourcesService.HomeViewResources.Get("OptionBarMessageVideosNotFound");
}
OptionBarSearchNotPending = true;
OptionBarMessageIcon = OptionBarMessageIconType.None;
}
} }
[RelayCommand] [RelayCommand]
@@ -178,6 +233,7 @@ namespace VDownload.Core.ViewModels.Home
{ {
OptionBarContent = OptionBarContentType.VideoSearch; OptionBarContent = OptionBarContentType.VideoSearch;
OptionBarPlaylistSearchButtonChecked = false; OptionBarPlaylistSearchButtonChecked = false;
OptionBarLoadSubscriptionButtonChecked = false;
} }
else else
{ {
@@ -197,6 +253,7 @@ namespace VDownload.Core.ViewModels.Home
{ {
OptionBarContent = OptionBarContentType.PlaylistSearch; OptionBarContent = OptionBarContentType.PlaylistSearch;
OptionBarVideoSearchButtonChecked = false; OptionBarVideoSearchButtonChecked = false;
OptionBarLoadSubscriptionButtonChecked = false;
} }
else else
{ {
@@ -253,9 +310,9 @@ namespace VDownload.Core.ViewModels.Home
return; return;
} }
_playlistViewModel.LoadPlaylist(playlist); _videoCollectionViewModel.LoadCollection(playlist);
MainContent = _playlistView; MainContent = _videoCollectionView;
OptionBarSearchNotPending = true; OptionBarSearchNotPending = true;
OptionBarMessageIcon = OptionBarMessageIconType.None; OptionBarMessageIcon = OptionBarMessageIconType.None;

View File

@@ -0,0 +1,39 @@
using CommunityToolkit.Mvvm.ComponentModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VDownload.Models;
namespace VDownload.Core.ViewModels.Subscriptions.Helpers
{
public partial class PlaylistViewModel : ObservableObject
{
#region PROPERTIES
[ObservableProperty]
protected Guid _guid;
[ObservableProperty]
protected string _name;
[ObservableProperty]
protected Source _source;
#endregion
#region CONSTRUCTORS
public PlaylistViewModel(string name, Source source, Guid guid)
{
_name = name;
_source = source;
_guid = guid;
}
#endregion
}
}

View File

@@ -0,0 +1,141 @@
using ABI.System;
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VDownload.Core.ViewModels.Subscriptions.Helpers;
using VDownload.Models;
using VDownload.Services.Data.Subscriptions;
using VDownload.Services.UI.StringResources;
using VDownload.Sources;
using VDownload.Sources.Common;
namespace VDownload.Core.ViewModels.Subscriptions
{
public partial class SubscriptionsViewModel : ObservableObject
{
#region SERVICES
protected readonly ISearchService _searchService;
protected readonly IStringResourcesService _stringResourcesService;
protected readonly ISubscriptionsDataService _subscriptionsDataService;
#endregion
#region PROPERTIES
[ObservableProperty]
protected ObservableCollection<PlaylistViewModel> _playlists;
[ObservableProperty]
protected string _url;
[ObservableProperty]
protected bool _loading;
[ObservableProperty]
protected string _error;
[ObservableProperty]
protected bool _isErrorOpened;
#endregion
#region CONSTRUCTORS
public SubscriptionsViewModel(ISearchService searchService, IStringResourcesService stringResourcesService, ISubscriptionsDataService subscriptionsDataService)
{
_searchService = searchService;
_stringResourcesService = stringResourcesService;
_subscriptionsDataService = subscriptionsDataService;
_playlists = new ObservableCollection<PlaylistViewModel>();
_loading = false;
_isErrorOpened = true;
_error = null;
}
#endregion
#region COMMANDS
[RelayCommand]
public void Navigation()
{
Playlists.Clear();
foreach (Subscription sub in _subscriptionsDataService.Data)
{
Playlists.Add(new PlaylistViewModel(sub.Name, sub.Source, sub.Guid));
}
}
[RelayCommand]
public async Task RemovePlaylist(PlaylistViewModel playlist)
{
Playlists.Remove(playlist);
Subscription sub = _subscriptionsDataService.Data.FirstOrDefault(x => x.Guid == playlist.Guid);
_subscriptionsDataService.Data.Remove(sub);
await _subscriptionsDataService.Save();
}
[RelayCommand]
public async Task Add()
{
Loading = true;
Playlist playlist;
try
{
playlist = await _searchService.SearchPlaylist(Url, 0);
}
catch (MediaSearchException ex)
{
Error = _stringResourcesService.SearchResources.Get(ex.StringCode);
Loading = false;
return;
}
if (_subscriptionsDataService.Data.Any(x => x.Source == playlist.Source && x.Name == playlist.Name))
{
Error = _stringResourcesService.SubscriptionsViewResources.Get("DuplicateError");
Loading = false;
return;
}
Subscription subscription = new Subscription
{
Name = playlist.Name,
Source = playlist.Source,
Url = playlist.Url,
};
playlist.ForEach(x => subscription.VideoIds.Add(x.Id));
_subscriptionsDataService.Data.Add(subscription);
await _subscriptionsDataService.Save();
Playlists.Add(new PlaylistViewModel(subscription.Name, subscription.Source, subscription.Guid));
Loading = false;
}
[RelayCommand]
public void CloseError()
{
Error = null;
IsErrorOpened = true;
}
#endregion
}
}

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Page <Page
x:Class="VDownload.Core.Views.Home.HomePlaylistView" x:Class="VDownload.Core.Views.Home.HomeVideoCollectionView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:VDownload.Core.Views.Home" xmlns:local="using:VDownload.Core.Views.Home"
@@ -41,7 +41,7 @@
Spacing="10"> Spacing="10">
<TextBlock VerticalAlignment="Center" <TextBlock VerticalAlignment="Center"
Visibility="{Binding IsSomethingHidden, Converter={StaticResource BoolToVisibilityConverter}}"> Visibility="{Binding IsSomethingHidden, Converter={StaticResource BoolToVisibilityConverter}}">
<Run x:Uid="/VDownload.Core.Strings/HomePlaylistViewResources/HiddenTextBlock"/><Run Text="{Binding HiddenCount}"/> <Run x:Uid="/VDownload.Core.Strings/HomeVideoCollectionViewResources/HiddenTextBlock"/><Run Text="{Binding HiddenCount}"/>
</TextBlock> </TextBlock>
<AppBarToggleButton x:Name="FilterButton" <AppBarToggleButton x:Name="FilterButton"
Icon="Filter" Icon="Filter"
@@ -49,7 +49,7 @@
Height="48"> Height="48">
<AppBarToggleButton.Resources> <AppBarToggleButton.Resources>
<TeachingTip x:Name="FilterWindow" <TeachingTip x:Name="FilterWindow"
x:Uid="/VDownload.Core.Strings/HomePlaylistViewResources/FilterWindow" x:Uid="/VDownload.Core.Strings/HomeVideoCollectionViewResources/FilterWindow"
Target="{Binding ElementName=FilterButton}" Target="{Binding ElementName=FilterButton}"
PreferredPlacement="BottomLeft" PreferredPlacement="BottomLeft"
IsOpen="{Binding ElementName=FilterButton, Path=IsChecked, Mode=TwoWay}"> IsOpen="{Binding ElementName=FilterButton, Path=IsChecked, Mode=TwoWay}">
@@ -69,23 +69,23 @@
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<TextBlock x:Uid="/VDownload.Core.Strings/HomePlaylistViewResources/FilterTitleTextBlock" <TextBlock x:Uid="/VDownload.Core.Strings/HomeVideoCollectionViewResources/FilterTitleTextBlock"
Grid.Row="0" Grid.Row="0"
Grid.Column="0" Grid.Column="0"
VerticalAlignment="Center"/> VerticalAlignment="Center"/>
<TextBox x:Uid="/VDownload.Core.Strings/HomePlaylistViewResources/FilterTitleTextBox" <TextBox x:Uid="/VDownload.Core.Strings/HomeVideoCollectionViewResources/FilterTitleTextBox"
Grid.Row="0" Grid.Row="0"
Grid.Column="1" Grid.Column="1"
Text="{Binding TitleFilter, Mode=TwoWay}"/> Text="{Binding TitleFilter, Mode=TwoWay}"/>
<TextBlock x:Uid="/VDownload.Core.Strings/HomePlaylistViewResources/FilterAuthorTextBlock" <TextBlock x:Uid="/VDownload.Core.Strings/HomeVideoCollectionViewResources/FilterAuthorTextBlock"
Grid.Row="1" Grid.Row="1"
Grid.Column="0" Grid.Column="0"
VerticalAlignment="Center"/> VerticalAlignment="Center"/>
<TextBox x:Uid="/VDownload.Core.Strings/HomePlaylistViewResources/FilterAuthorTextBox" <TextBox x:Uid="/VDownload.Core.Strings/HomeVideoCollectionViewResources/FilterAuthorTextBox"
Grid.Row="1" Grid.Row="1"
Grid.Column="1" Grid.Column="1"
Text="{Binding AuthorFilter, Mode=TwoWay}"/> Text="{Binding AuthorFilter, Mode=TwoWay}"/>
<TextBlock x:Uid="/VDownload.Core.Strings/HomePlaylistViewResources/FilterViewsTextBlock" <TextBlock x:Uid="/VDownload.Core.Strings/HomeVideoCollectionViewResources/FilterViewsTextBlock"
Grid.Row="2" Grid.Row="2"
Grid.Column="0" Grid.Column="0"
VerticalAlignment="Center"/> VerticalAlignment="Center"/>
@@ -115,7 +115,7 @@
SmallChange="1" SmallChange="1"
LargeChange="10"/> LargeChange="10"/>
</Grid> </Grid>
<TextBlock x:Uid="/VDownload.Core.Strings/HomePlaylistViewResources/FilterDateTextBlock" <TextBlock x:Uid="/VDownload.Core.Strings/HomeVideoCollectionViewResources/FilterDateTextBlock"
Grid.Row="3" Grid.Row="3"
Grid.Column="0" Grid.Column="0"
VerticalAlignment="Center"/> VerticalAlignment="Center"/>
@@ -139,7 +139,7 @@
Date="{Binding MaxDateFilter, Mode=TwoWay}" Date="{Binding MaxDateFilter, Mode=TwoWay}"
MaxDate="{Binding MaxDate}"/> MaxDate="{Binding MaxDate}"/>
</Grid> </Grid>
<TextBlock x:Uid="/VDownload.Core.Strings/HomePlaylistViewResources/FilterDurationTextBlock" <TextBlock x:Uid="/VDownload.Core.Strings/HomeVideoCollectionViewResources/FilterDurationTextBlock"
Grid.Row="4" Grid.Row="4"
Grid.Column="0" Grid.Column="0"
VerticalAlignment="Center"/> VerticalAlignment="Center"/>
@@ -159,7 +159,7 @@
Value="{Binding MaxDurationFilter, Mode=TwoWay}" Value="{Binding MaxDurationFilter, Mode=TwoWay}"
Maximum="{Binding MaxDuration}"/> Maximum="{Binding MaxDuration}"/>
</Grid> </Grid>
<TextBlock x:Uid="/VDownload.Core.Strings/HomePlaylistViewResources/FilterRemovedTextBlock" <TextBlock x:Uid="/VDownload.Core.Strings/HomeVideoCollectionViewResources/FilterRemovedTextBlock"
Grid.Row="5" Grid.Row="5"
Grid.Column="0" Grid.Column="0"
VerticalAlignment="Center"/> VerticalAlignment="Center"/>
@@ -172,7 +172,7 @@
<TextBlock Grid.Column="0" <TextBlock Grid.Column="0"
VerticalAlignment="Center" VerticalAlignment="Center"
Text="{Binding RemovedCount}"/> Text="{Binding RemovedCount}"/>
<Button x:Uid="/VDownload.Core.Strings/HomePlaylistViewResources/FilterRemovedButton" <Button x:Uid="/VDownload.Core.Strings/HomeVideoCollectionViewResources/FilterRemovedButton"
Grid.Column="1" Grid.Column="1"
Command="{Binding RestoreRemovedVideosCommand}"/> Command="{Binding RestoreRemovedVideosCommand}"/>
</Grid> </Grid>
@@ -180,7 +180,7 @@
</TeachingTip> </TeachingTip>
</AppBarToggleButton.Resources> </AppBarToggleButton.Resources>
</AppBarToggleButton> </AppBarToggleButton>
<AppBarButton x:Uid="/VDownload.Core.Strings/HomePlaylistViewResources/ApplyDirectoryButton" <AppBarButton x:Uid="/VDownload.Core.Strings/HomeVideoCollectionViewResources/ApplyDirectoryButton"
Icon="Folder" Icon="Folder"
Width="40" Width="40"
Height="48" Height="48"
@@ -238,7 +238,7 @@
<Image Grid.Column="0" <Image Grid.Column="0"
Grid.Row="0" Grid.Row="0"
VerticalAlignment="Center" VerticalAlignment="Center"
Source="{ThemeResource ImageHomePlaylistViewAuthor}" Source="{ThemeResource ImageHomeVideoCollectionViewAuthor}"
Width="{StaticResource IconSize}"/> Width="{StaticResource IconSize}"/>
<TextBlock Grid.Column="1" <TextBlock Grid.Column="1"
Grid.Row="0" Grid.Row="0"
@@ -248,7 +248,7 @@
<Image Grid.Column="0" <Image Grid.Column="0"
Grid.Row="1" Grid.Row="1"
VerticalAlignment="Center" VerticalAlignment="Center"
Source="{ThemeResource ImageHomePlaylistViewDate}" Source="{ThemeResource ImageHomeVideoCollectionViewDate}"
Width="{StaticResource IconSize}"/> Width="{StaticResource IconSize}"/>
<TextBlock Grid.Column="1" <TextBlock Grid.Column="1"
Grid.Row="1" Grid.Row="1"
@@ -258,7 +258,7 @@
<Image Grid.Column="2" <Image Grid.Column="2"
Grid.Row="0" Grid.Row="0"
VerticalAlignment="Center" VerticalAlignment="Center"
Source="{ThemeResource ImageHomePlaylistViewTime}" Source="{ThemeResource ImageHomeVideoCollectionViewTime}"
Width="{StaticResource IconSize}"/> Width="{StaticResource IconSize}"/>
<TextBlock Grid.Column="3" <TextBlock Grid.Column="3"
Grid.Row="0" Grid.Row="0"
@@ -268,7 +268,7 @@
<Image Grid.Column="2" <Image Grid.Column="2"
Grid.Row="1" Grid.Row="1"
VerticalAlignment="Center" VerticalAlignment="Center"
Source="{ThemeResource ImageHomePlaylistViewViews}" Source="{ThemeResource ImageHomeVideoCollectionViewViews}"
Width="{StaticResource IconSize}"/> Width="{StaticResource IconSize}"/>
<TextBlock Grid.Column="3" <TextBlock Grid.Column="3"
Grid.Row="1" Grid.Row="1"
@@ -289,21 +289,21 @@
<Expander.Content> <Expander.Content>
<StackPanel Spacing="20"> <StackPanel Spacing="20">
<StackPanel Spacing="5"> <StackPanel Spacing="5">
<TextBlock x:Uid="/VDownload.Core.Strings/HomePlaylistViewResources/MediaOptionsHeader" <TextBlock x:Uid="/VDownload.Core.Strings/HomeVideoCollectionViewResources/MediaOptionsHeader"
FontWeight="Bold" FontWeight="Bold"
FontSize="15"/> FontSize="15"/>
<ctc:SettingsCard x:Uid="/VDownload.Core.Strings/HomePlaylistViewResources/QualitySettingsCard"> <ctc:SettingsCard x:Uid="/VDownload.Core.Strings/HomeVideoCollectionViewResources/QualitySettingsCard">
<ctc:SettingsCard.HeaderIcon> <ctc:SettingsCard.HeaderIcon>
<BitmapIcon ShowAsMonochrome="False" <BitmapIcon ShowAsMonochrome="False"
UriSource="{ThemeResource ImageHomePlaylistViewMedia}"/> UriSource="{ThemeResource ImageHomeVideoCollectionViewMedia}"/>
</ctc:SettingsCard.HeaderIcon> </ctc:SettingsCard.HeaderIcon>
<ComboBox ItemsSource="{Binding Key.Streams}" <ComboBox ItemsSource="{Binding Key.Streams}"
SelectedItem="{Binding Key.SelectedStream, Mode=TwoWay}"/> SelectedItem="{Binding Key.SelectedStream, Mode=TwoWay}"/>
</ctc:SettingsCard> </ctc:SettingsCard>
<ctc:SettingsCard x:Uid="/VDownload.Core.Strings/HomePlaylistViewResources/MediaTypeSettingsCard"> <ctc:SettingsCard x:Uid="/VDownload.Core.Strings/HomeVideoCollectionViewResources/MediaTypeSettingsCard">
<ctc:SettingsCard.HeaderIcon> <ctc:SettingsCard.HeaderIcon>
<BitmapIcon ShowAsMonochrome="False" <BitmapIcon ShowAsMonochrome="False"
UriSource="{ThemeResource ImageHomePlaylistViewMedia}"/> UriSource="{ThemeResource ImageHomeVideoCollectionViewMedia}"/>
</ctc:SettingsCard.HeaderIcon> </ctc:SettingsCard.HeaderIcon>
<ComboBox ItemsSource="{ct:EnumValues Type=m:MediaType}" <ComboBox ItemsSource="{ct:EnumValues Type=m:MediaType}"
SelectedItem="{Binding Key.MediaType, Mode=TwoWay}"> SelectedItem="{Binding Key.MediaType, Mode=TwoWay}">
@@ -324,17 +324,17 @@
</ComboBox.ItemTemplate> </ComboBox.ItemTemplate>
</ComboBox> </ComboBox>
</ctc:SettingsCard> </ctc:SettingsCard>
<ctc:SettingsExpander x:Uid="/VDownload.Core.Strings/HomePlaylistViewResources/TrimSettingsGroup"> <ctc:SettingsExpander x:Uid="/VDownload.Core.Strings/HomeVideoCollectionViewResources/TrimSettingsGroup">
<ctc:SettingsExpander.HeaderIcon> <ctc:SettingsExpander.HeaderIcon>
<BitmapIcon ShowAsMonochrome="False" <BitmapIcon ShowAsMonochrome="False"
UriSource="{ThemeResource ImageHomePlaylistViewTrim}"/> UriSource="{ThemeResource ImageHomeVideoCollectionViewTrim}"/>
</ctc:SettingsExpander.HeaderIcon> </ctc:SettingsExpander.HeaderIcon>
<ctc:SettingsExpander.Items> <ctc:SettingsExpander.Items>
<ctc:SettingsCard x:Uid="/VDownload.Core.Strings/HomePlaylistViewResources/TrimStartSettingsCard"> <ctc:SettingsCard x:Uid="/VDownload.Core.Strings/HomeVideoCollectionViewResources/TrimStartSettingsCard">
<c:TimeSpanControl Value="{Binding Key.TrimStart, Mode=TwoWay}" <c:TimeSpanControl Value="{Binding Key.TrimStart, Mode=TwoWay}"
Maximum="{Binding Key.TrimEnd, Mode=OneWay}"/> Maximum="{Binding Key.TrimEnd, Mode=OneWay}"/>
</ctc:SettingsCard> </ctc:SettingsCard>
<ctc:SettingsCard x:Uid="/VDownload.Core.Strings/HomePlaylistViewResources/TrimEndSettingsCard"> <ctc:SettingsCard x:Uid="/VDownload.Core.Strings/HomeVideoCollectionViewResources/TrimEndSettingsCard">
<c:TimeSpanControl Minimum="{Binding Key.TrimStart, Mode=OneWay}" <c:TimeSpanControl Minimum="{Binding Key.TrimStart, Mode=OneWay}"
Value="{Binding Key.TrimEnd, Mode=TwoWay}" Value="{Binding Key.TrimEnd, Mode=TwoWay}"
Maximum="{Binding Key.Duration, Mode=OneWay}"/> Maximum="{Binding Key.Duration, Mode=OneWay}"/>
@@ -343,29 +343,29 @@
</ctc:SettingsExpander> </ctc:SettingsExpander>
</StackPanel> </StackPanel>
<StackPanel Spacing="5"> <StackPanel Spacing="5">
<TextBlock x:Uid="/VDownload.Core.Strings/HomePlaylistViewResources/FileOptionsHeader" <TextBlock x:Uid="/VDownload.Core.Strings/HomeVideoCollectionViewResources/FileOptionsHeader"
FontWeight="Bold" FontWeight="Bold"
FontSize="15"/> FontSize="15"/>
<ctc:SettingsCard x:Uid="/VDownload.Core.Strings/HomePlaylistViewResources/DirectorySettingsCard" <ctc:SettingsCard x:Uid="/VDownload.Core.Strings/HomeVideoCollectionViewResources/DirectorySettingsCard"
Description="{Binding Key.DirectoryPath}"> Description="{Binding Key.DirectoryPath}">
<ctc:SettingsCard.HeaderIcon> <ctc:SettingsCard.HeaderIcon>
<BitmapIcon ShowAsMonochrome="False" <BitmapIcon ShowAsMonochrome="False"
UriSource="{ThemeResource ImageHomePlaylistViewDirectory}"/> UriSource="{ThemeResource ImageHomeVideoCollectionViewDirectory}"/>
</ctc:SettingsCard.HeaderIcon> </ctc:SettingsCard.HeaderIcon>
<Button x:Uid="/VDownload.Core.Strings/HomePlaylistViewResources/DirectorySettingsCardButton" <Button x:Uid="/VDownload.Core.Strings/HomeVideoCollectionViewResources/DirectorySettingsCardButton"
Command="{Binding Key.BrowseCommand}"/> Command="{Binding Key.BrowseCommand}"/>
</ctc:SettingsCard> </ctc:SettingsCard>
<ctc:SettingsCard x:Uid="/VDownload.Core.Strings/HomePlaylistViewResources/FilenameSettingsCard"> <ctc:SettingsCard x:Uid="/VDownload.Core.Strings/HomeVideoCollectionViewResources/FilenameSettingsCard">
<ctc:SettingsCard.HeaderIcon> <ctc:SettingsCard.HeaderIcon>
<BitmapIcon ShowAsMonochrome="False" <BitmapIcon ShowAsMonochrome="False"
UriSource="{ThemeResource ImageHomePlaylistViewFilename}"/> UriSource="{ThemeResource ImageHomeVideoCollectionViewFilename}"/>
</ctc:SettingsCard.HeaderIcon> </ctc:SettingsCard.HeaderIcon>
<TextBox Text="{Binding Key.Filename, Mode=TwoWay}"/> <TextBox Text="{Binding Key.Filename, Mode=TwoWay}"/>
</ctc:SettingsCard> </ctc:SettingsCard>
<ctc:SettingsCard x:Uid="/VDownload.Core.Strings/HomePlaylistViewResources/FileTypeSettingsCard"> <ctc:SettingsCard x:Uid="/VDownload.Core.Strings/HomeVideoCollectionViewResources/FileTypeSettingsCard">
<ctc:SettingsCard.HeaderIcon> <ctc:SettingsCard.HeaderIcon>
<BitmapIcon ShowAsMonochrome="False" <BitmapIcon ShowAsMonochrome="False"
UriSource="{ThemeResource ImageHomePlaylistViewExtension}"/> UriSource="{ThemeResource ImageHomeVideoCollectionViewExtension}"/>
</ctc:SettingsCard.HeaderIcon> </ctc:SettingsCard.HeaderIcon>
<i:Interaction.Behaviors> <i:Interaction.Behaviors>
<ic:DataTriggerBehavior Binding="{Binding Key.MediaType, Converter={StaticResource ObjectToStringConverter}}" <ic:DataTriggerBehavior Binding="{Binding Key.MediaType, Converter={StaticResource ObjectToStringConverter}}"
@@ -414,9 +414,9 @@
HorizontalAlignment="Right" HorizontalAlignment="Right"
Orientation="Horizontal" Orientation="Horizontal"
Spacing="10"> Spacing="10">
<Button x:Uid="/VDownload.Core.Strings/HomePlaylistViewResources/CreateAndStartButton" <Button x:Uid="/VDownload.Core.Strings/HomeVideoCollectionViewResources/CreateAndStartButton"
Command="{Binding CreateTasksAndDownloadCommand}"/> Command="{Binding CreateTasksAndDownloadCommand}"/>
<Button x:Uid="/VDownload.Core.Strings/HomePlaylistViewResources/CreateButton" <Button x:Uid="/VDownload.Core.Strings/HomeVideoCollectionViewResources/CreateButton"
Style="{StaticResource AccentButtonStyle}" Style="{StaticResource AccentButtonStyle}"
Command="{Binding CreateTasksCommand}"/> Command="{Binding CreateTasksCommand}"/>
</StackPanel> </StackPanel>

View File

@@ -16,11 +16,11 @@ using Windows.Foundation.Collections;
namespace VDownload.Core.Views.Home namespace VDownload.Core.Views.Home
{ {
public sealed partial class HomePlaylistView : Page public sealed partial class HomeVideoCollectionView : Page
{ {
#region CONSTRUCTORS #region CONSTRUCTORS
public HomePlaylistView(HomePlaylistViewModel viewModel) public HomeVideoCollectionView(HomeVideoCollectionViewModel viewModel)
{ {
this.InitializeComponent(); this.InitializeComponent();
this.DataContext = viewModel; this.DataContext = viewModel;

View File

@@ -129,10 +129,11 @@
</ctuc:UniformGrid> </ctuc:UniformGrid>
<StackPanel Grid.Column="2" <StackPanel Grid.Column="2"
Orientation="Horizontal"> Orientation="Horizontal">
<AppBarButton x:Uid="/VDownload.Core.Strings/HomeViewResources/OptionBarLoadSubscription" <AppBarToggleButton x:Uid="/VDownload.Core.Strings/HomeViewResources/OptionBarLoadSubscription"
Icon="Favorite" Icon="Favorite"
IsEnabled="{Binding OptionBarSearchNotPending}" IsEnabled="{Binding OptionBarSearchNotPending}"
Command="{Binding LoadFromSubscriptionCommand}"/> IsChecked="{Binding OptionBarLoadSubscriptionButtonChecked, Mode=TwoWay}"
Command="{Binding LoadFromSubscriptionCommand}"/>
<AppBarToggleButton x:Uid="/VDownload.Core.Strings/HomeViewResources/OptionBarVideoSearch" <AppBarToggleButton x:Uid="/VDownload.Core.Strings/HomeViewResources/OptionBarVideoSearch"
Icon="Video" Icon="Video"
IsEnabled="{Binding OptionBarSearchNotPending}" IsEnabled="{Binding OptionBarSearchNotPending}"

View File

@@ -0,0 +1,116 @@
<?xml version="1.0" encoding="utf-8"?>
<Page
x:Class="VDownload.Core.Views.Subscriptions.SubscriptionsView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:VDownload.Core.Views.Subscriptions"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ctuc="using:CommunityToolkit.WinUI.UI.Controls"
xmlns:ctc="using:CommunityToolkit.WinUI.Controls"
xmlns:ct="using:CommunityToolkit.WinUI"
xmlns:i="using:Microsoft.Xaml.Interactivity"
xmlns:ic="using:Microsoft.Xaml.Interactions.Core"
mc:Ignorable="d"
Background="{ThemeResource ViewBackgroundColor}"
x:Name="Root">
<i:Interaction.Behaviors>
<ic:EventTriggerBehavior EventName="Loaded">
<ic:InvokeCommandAction Command="{Binding NavigationCommand}"/>
</ic:EventTriggerBehavior>
</i:Interaction.Behaviors>
<Grid Padding="20"
RowSpacing="20">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TextBlock x:Uid="/VDownload.Core.Strings/SubscriptionsViewResources/Header"
Grid.Row="0"
FontSize="28"
FontWeight="SemiBold"/>
<ScrollViewer Grid.Row="1">
<ItemsControl ItemsSource="{Binding Playlists}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<ctuc:StaggeredPanel ColumnSpacing="10"
DesiredColumnWidth="120"
RowSpacing="10"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<Grid RowSpacing="10"
Padding="10"
Background="{ThemeResource PanelBackgroundColor}"
CornerRadius="10">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Image Grid.Row="0">
<i:Interaction.Behaviors>
<ic:DataTriggerBehavior Binding="{Binding Source, Converter={StaticResource ObjectToStringConverter}}"
Value="Twitch">
<ic:ChangePropertyAction PropertyName="Source"
Value="{StaticResource ImageSourcesTwitch}"/>
</ic:DataTriggerBehavior>
</i:Interaction.Behaviors>
</Image>
<TextBlock Grid.Row="1"
Text="{Binding Name}"
HorizontalAlignment="Center"
TextTrimming="CharacterEllipsis"/>
<HyperlinkButton x:Uid="/VDownload.Core.Strings/SubscriptionsViewResources/RemovePlaylistButton"
Grid.Row="2"
Content="Remove"
HorizontalAlignment="Center"
Command="{Binding DataContext.RemovePlaylistCommand, ElementName=Root}"
CommandParameter="{Binding}"/>
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</ScrollViewer>
<ctuc:SwitchPresenter Grid.Row="2"
Value="{Binding Error, Converter={StaticResource IsNotNullConverter}}">
<ctuc:Case Value="False">
<Grid Background="{ThemeResource PanelBackgroundColor}"
Padding="10"
ColumnSpacing="10"
CornerRadius="10">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBox x:Uid="/VDownload.Core.Strings/SubscriptionsViewResources/PlaylistUrlTextBox"
Grid.Column="0"
Text="{Binding Url, Mode=TwoWay}"
IsEnabled="{Binding Loading, Converter={StaticResource BoolNegationConverter}}"/>
<ctuc:SwitchPresenter Grid.Column="1"
Value="{Binding Loading, Converter={StaticResource ObjectToStringConverter}}">
<ctuc:Case Value="True">
<ProgressRing IsIndeterminate="True"
Width="20"
Height="20"/>
</ctuc:Case>
<ctuc:Case Value="False">
<Button x:Uid="/VDownload.Core.Strings/SubscriptionsViewResources/PlaylistSearchButton"
Command="{Binding AddCommand}"/>
</ctuc:Case>
</ctuc:SwitchPresenter>
</Grid>
</ctuc:Case>
<ctuc:Case Value="True">
<InfoBar x:Uid="/VDownload.Core.Strings/SubscriptionsViewResources/ErrorInfoBar"
Severity="Error"
IsOpen="{Binding IsErrorOpened, Mode=TwoWay}"
Message="{Binding Error}"
CloseButtonCommand="{Binding CloseErrorCommand}"/>
</ctuc:Case>
</ctuc:SwitchPresenter>
</Grid>
</Page>

View File

@@ -0,0 +1,32 @@
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml.Controls.Primitives;
using Microsoft.UI.Xaml.Data;
using Microsoft.UI.Xaml.Input;
using Microsoft.UI.Xaml.Media;
using Microsoft.UI.Xaml.Navigation;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using VDownload.Core.ViewModels.About;
using VDownload.Core.ViewModels.Subscriptions;
using Windows.Foundation;
using Windows.Foundation.Collections;
namespace VDownload.Core.Views.Subscriptions
{
public sealed partial class SubscriptionsView : Page
{
#region CONSTRUCTORS
public SubscriptionsView(SubscriptionsViewModel viewModel)
{
this.InitializeComponent();
this.DataContext = viewModel;
}
#endregion
}
}

View File

@@ -10,7 +10,8 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<None Remove="About\AboutView.xaml" /> <None Remove="About\AboutView.xaml" />
<None Remove="Home\HomePlaylistView.xaml" /> <None Remove="Home\HomeVideoCollectionView.xaml" />
<None Remove="Subscriptions\SubscriptionsView.xaml" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
@@ -44,7 +45,10 @@
<None Update="Home\HomeDownloadsView.xaml"> <None Update="Home\HomeDownloadsView.xaml">
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
</None> </None>
<Page Update="Home\HomePlaylistView.xaml"> <Page Update="Subscriptions\SubscriptionsView.xaml">
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Update="Home\HomeVideoCollectionView.xaml">
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
</Page> </Page>
<None Update="Home\HomeVideoView.xaml"> <None Update="Home\HomeVideoView.xaml">

View File

@@ -6,10 +6,12 @@ using VDownload.Core.ViewModels.About;
using VDownload.Core.ViewModels.Authentication; using VDownload.Core.ViewModels.Authentication;
using VDownload.Core.ViewModels.Home; using VDownload.Core.ViewModels.Home;
using VDownload.Core.ViewModels.Settings; using VDownload.Core.ViewModels.Settings;
using VDownload.Core.ViewModels.Subscriptions;
using VDownload.Core.Views.About; using VDownload.Core.Views.About;
using VDownload.Core.Views.Authentication; using VDownload.Core.Views.Authentication;
using VDownload.Core.Views.Home; using VDownload.Core.Views.Home;
using VDownload.Core.Views.Settings; using VDownload.Core.Views.Settings;
using VDownload.Core.Views.Subscriptions;
namespace VDownload.Core.Views namespace VDownload.Core.Views
{ {
@@ -22,7 +24,8 @@ namespace VDownload.Core.Views
{ typeof(HomeViewModel), typeof(HomeView) }, { typeof(HomeViewModel), typeof(HomeView) },
{ typeof(HomeDownloadsViewModel), typeof(HomeDownloadsView) }, { typeof(HomeDownloadsViewModel), typeof(HomeDownloadsView) },
{ typeof(HomeVideoViewModel), typeof(HomeVideoView) }, { typeof(HomeVideoViewModel), typeof(HomeVideoView) },
{ typeof(HomePlaylistViewModel), typeof(HomePlaylistView) }, { typeof(HomeVideoCollectionViewModel), typeof(HomeVideoCollectionView) },
{ typeof(SubscriptionsViewModel), typeof(SubscriptionsView) },
{ typeof(SettingsViewModel), typeof(SettingsView) }, { typeof(SettingsViewModel), typeof(SettingsView) },
{ typeof(AboutViewModel), typeof(AboutView) }, { typeof(AboutViewModel), typeof(AboutView) },
{ typeof(AuthenticationViewModel), typeof(AuthenticationView) } { typeof(AuthenticationViewModel), typeof(AuthenticationView) }

View File

@@ -6,11 +6,10 @@ using System.Threading.Tasks;
namespace VDownload.Models namespace VDownload.Models
{ {
public abstract class Playlist : List<Video> public abstract class Playlist : VideoCollection
{ {
#region PROPERTIES #region PROPERTIES
public required string Name { get; set; }
public required string Description { get; set; } public required string Description { get; set; }
public required Uri Url { get; set; } public required Uri Url { get; set; }
public Source Source { get; protected set; } public Source Source { get; protected set; }

View File

@@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace VDownload.Models
{
public class SubscriptionsVideoList : VideoCollection
{
}
}

View File

@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace VDownload.Models
{
public abstract class VideoCollection : List<Video>
{
#region PROPERTIES
public required string Name { get; init; }
#endregion
}
}

View File

@@ -21,5 +21,8 @@ namespace VDownload.Services.Data.Configuration.Models
[ConfigurationKeyName("data_file")] [ConfigurationKeyName("data_file")]
public string DataFile { get; set; } public string DataFile { get; set; }
[ConfigurationKeyName("subscriptions_file")]
public string SubscriptionsFile { get; set; }
} }
} }

View File

@@ -0,0 +1,32 @@
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VDownload.Models;
namespace VDownload.Services.Data.Subscriptions
{
public class Subscription
{
#region PROPERTIES
[JsonProperty("guid")]
public Guid Guid { get; private set; } = Guid.NewGuid();
[JsonProperty("name")]
public string Name { get; set; }
[JsonProperty("source")]
public Source Source { get; set; }
[JsonProperty("url")]
public Uri Url { get; set; }
[JsonProperty("video_ids")]
public ICollection<string> VideoIds { get; private set; } = new List<string>();
#endregion
}
}

View File

@@ -0,0 +1,97 @@
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using VDownload.Services.Data.Configuration;
namespace VDownload.Services.Data.Subscriptions
{
public interface ISubscriptionsDataService
{
#region PROPERTIES
ICollection<Subscription> Data { get; }
#endregion
#region METHODS
Task Load();
Task Save();
#endregion
}
public class SubscriptionsDataService : ISubscriptionsDataService
{
#region SERVICES
protected readonly IConfigurationService _configurationService;
#endregion
#region FIELDS
protected readonly string _filePath;
#endregion
#region PROPERTIES
public ICollection<Subscription> Data { get; private set; }
#endregion
#region CONSTRUCTORS
public SubscriptionsDataService(IConfigurationService configurationService)
{
_configurationService = configurationService;
string appdataPath = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
string appdataDirectoryName = _configurationService.Common.Path.Appdata.DirectoryName;
string appdataAuthenticationFilename = _configurationService.Common.Path.Appdata.SubscriptionsFile;
_filePath = Path.Combine(appdataPath, appdataDirectoryName, appdataAuthenticationFilename);
}
#endregion
#region PUBLIC METHODS
public async Task Load()
{
if (File.Exists(_filePath))
{
string content = await File.ReadAllTextAsync(_filePath);
Data = JsonConvert.DeserializeObject<ICollection<Subscription>>(content);
}
else
{
Data = new List<Subscription>();
}
}
public async Task Save()
{
Directory.CreateDirectory(Path.GetDirectoryName(_filePath));
string content = JsonConvert.SerializeObject(Data);
await File.WriteAllTextAsync(_filePath, content);
}
#endregion
}
}

View File

@@ -0,0 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\VDownload.Models\VDownload.Models.csproj" />
<ProjectReference Include="..\VDownload.Services.Data.Configuration\VDownload.Services.Data.Configuration.csproj" />
</ItemGroup>
</Project>

View File

@@ -8,7 +8,7 @@ namespace VDownload.Services.UI.StringResources
StringResources BaseViewResources { get; } StringResources BaseViewResources { get; }
StringResources HomeViewResources { get; } StringResources HomeViewResources { get; }
StringResources HomeVideoViewResources { get; } StringResources HomeVideoViewResources { get; }
StringResources HomePlaylistViewResources { get; } StringResources HomeVideoCollectionViewResources { get; }
StringResources HomeDownloadsViewResources { get; } StringResources HomeDownloadsViewResources { get; }
StringResources AuthenticationViewResources { get; } StringResources AuthenticationViewResources { get; }
StringResources NotificationsResources { get; } StringResources NotificationsResources { get; }
@@ -18,6 +18,7 @@ namespace VDownload.Services.UI.StringResources
StringResources SettingsViewResources { get; } StringResources SettingsViewResources { get; }
StringResources FilenameTemplateResources { get; } StringResources FilenameTemplateResources { get; }
StringResources AboutViewResources { get; } StringResources AboutViewResources { get; }
StringResources SubscriptionsViewResources { get; }
} }
@@ -37,7 +38,7 @@ namespace VDownload.Services.UI.StringResources
public StringResources BaseViewResources { get; protected set; } public StringResources BaseViewResources { get; protected set; }
public StringResources HomeViewResources { get; protected set; } public StringResources HomeViewResources { get; protected set; }
public StringResources HomeVideoViewResources { get; protected set; } public StringResources HomeVideoViewResources { get; protected set; }
public StringResources HomePlaylistViewResources { get; protected set; } public StringResources HomeVideoCollectionViewResources { get; protected set; }
public StringResources HomeDownloadsViewResources { get; protected set; } public StringResources HomeDownloadsViewResources { get; protected set; }
public StringResources AuthenticationViewResources { get; protected set; } public StringResources AuthenticationViewResources { get; protected set; }
public StringResources NotificationsResources { get; protected set; } public StringResources NotificationsResources { get; protected set; }
@@ -47,6 +48,7 @@ namespace VDownload.Services.UI.StringResources
public StringResources SettingsViewResources { get; protected set; } public StringResources SettingsViewResources { get; protected set; }
public StringResources FilenameTemplateResources { get; protected set; } public StringResources FilenameTemplateResources { get; protected set; }
public StringResources AboutViewResources { get; protected set; } public StringResources AboutViewResources { get; protected set; }
public StringResources SubscriptionsViewResources { get; protected set; }
#endregion #endregion
@@ -61,7 +63,7 @@ namespace VDownload.Services.UI.StringResources
BaseViewResources = BuildResource("BaseViewResources"); BaseViewResources = BuildResource("BaseViewResources");
HomeViewResources = BuildResource("HomeViewResources"); HomeViewResources = BuildResource("HomeViewResources");
HomeVideoViewResources = BuildResource("HomeVideoViewResources"); HomeVideoViewResources = BuildResource("HomeVideoViewResources");
HomePlaylistViewResources = BuildResource("HomePlaylistViewResources"); HomeVideoCollectionViewResources = BuildResource("HomeVideoCollectionViewResources");
HomeDownloadsViewResources = BuildResource("HomeDownloadsViewResources"); HomeDownloadsViewResources = BuildResource("HomeDownloadsViewResources");
AuthenticationViewResources = BuildResource("AuthenticationViewResources"); AuthenticationViewResources = BuildResource("AuthenticationViewResources");
NotificationsResources = BuildResource("NotificationsResources"); NotificationsResources = BuildResource("NotificationsResources");
@@ -71,6 +73,7 @@ namespace VDownload.Services.UI.StringResources
SettingsViewResources = BuildResource("SettingsViewResources"); SettingsViewResources = BuildResource("SettingsViewResources");
FilenameTemplateResources = BuildResource("FilenameTemplateResources"); FilenameTemplateResources = BuildResource("FilenameTemplateResources");
AboutViewResources = BuildResource("AboutViewResources"); AboutViewResources = BuildResource("AboutViewResources");
SubscriptionsViewResources = BuildResource("SubscriptionsViewResources");
} }
#endregion #endregion

View File

@@ -8,6 +8,7 @@
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\VDownload.Services\VDownload.Services.Data\VDownload.Services.Data.Configuration\VDownload.Services.Data.Configuration.csproj" /> <ProjectReference Include="..\..\VDownload.Services\VDownload.Services.Data\VDownload.Services.Data.Configuration\VDownload.Services.Data.Configuration.csproj" />
<ProjectReference Include="..\..\VDownload.Services\VDownload.Services.Data\VDownload.Services.Data.Subscriptions\VDownload.Services.Data.Subscriptions.csproj" />
<ProjectReference Include="..\VDownload.Sources.Common\VDownload.Sources.Common.csproj" /> <ProjectReference Include="..\VDownload.Sources.Common\VDownload.Sources.Common.csproj" />
<ProjectReference Include="..\VDownload.Sources.Twitch\VDownload.Sources.Twitch\VDownload.Sources.Twitch.csproj" /> <ProjectReference Include="..\VDownload.Sources.Twitch\VDownload.Sources.Twitch\VDownload.Sources.Twitch.csproj" />
</ItemGroup> </ItemGroup>

View File

@@ -71,7 +71,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VDownload.Services.Utility.
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VDownload.Services.Utility.Filename", "VDownload.Services\VDownload.Services.Utility\VDownload.Services.Utility.Filename\VDownload.Services.Utility.Filename.csproj", "{4647EFB5-A206-4F47-976D-BAED11B52579}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VDownload.Services.Utility.Filename", "VDownload.Services\VDownload.Services.Utility\VDownload.Services.Utility.Filename\VDownload.Services.Utility.Filename.csproj", "{4647EFB5-A206-4F47-976D-BAED11B52579}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VDownload.Services.Data.Application", "VDownload.Services\VDownload.Services.Data\VDownload.Services.Data.Application\VDownload.Services.Data.Application.csproj", "{4983E15B-3730-4646-A2BD-16B9ECC9E4FF}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VDownload.Services.Data.Application", "VDownload.Services\VDownload.Services.Data\VDownload.Services.Data.Application\VDownload.Services.Data.Application.csproj", "{4983E15B-3730-4646-A2BD-16B9ECC9E4FF}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VDownload.Services.Data.Subscriptions", "VDownload.Services\VDownload.Services.Data\VDownload.Services.Data.Subscriptions\VDownload.Services.Data.Subscriptions.csproj", "{3193DABC-87F8-4256-9449-3CF42FEF7098}"
EndProject EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -539,6 +541,22 @@ Global
{4983E15B-3730-4646-A2BD-16B9ECC9E4FF}.Release|x64.Build.0 = Release|Any CPU {4983E15B-3730-4646-A2BD-16B9ECC9E4FF}.Release|x64.Build.0 = Release|Any CPU
{4983E15B-3730-4646-A2BD-16B9ECC9E4FF}.Release|x86.ActiveCfg = Release|Any CPU {4983E15B-3730-4646-A2BD-16B9ECC9E4FF}.Release|x86.ActiveCfg = Release|Any CPU
{4983E15B-3730-4646-A2BD-16B9ECC9E4FF}.Release|x86.Build.0 = Release|Any CPU {4983E15B-3730-4646-A2BD-16B9ECC9E4FF}.Release|x86.Build.0 = Release|Any CPU
{3193DABC-87F8-4256-9449-3CF42FEF7098}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3193DABC-87F8-4256-9449-3CF42FEF7098}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3193DABC-87F8-4256-9449-3CF42FEF7098}.Debug|ARM64.ActiveCfg = Debug|Any CPU
{3193DABC-87F8-4256-9449-3CF42FEF7098}.Debug|ARM64.Build.0 = Debug|Any CPU
{3193DABC-87F8-4256-9449-3CF42FEF7098}.Debug|x64.ActiveCfg = Debug|Any CPU
{3193DABC-87F8-4256-9449-3CF42FEF7098}.Debug|x64.Build.0 = Debug|Any CPU
{3193DABC-87F8-4256-9449-3CF42FEF7098}.Debug|x86.ActiveCfg = Debug|Any CPU
{3193DABC-87F8-4256-9449-3CF42FEF7098}.Debug|x86.Build.0 = Debug|Any CPU
{3193DABC-87F8-4256-9449-3CF42FEF7098}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3193DABC-87F8-4256-9449-3CF42FEF7098}.Release|Any CPU.Build.0 = Release|Any CPU
{3193DABC-87F8-4256-9449-3CF42FEF7098}.Release|ARM64.ActiveCfg = Release|Any CPU
{3193DABC-87F8-4256-9449-3CF42FEF7098}.Release|ARM64.Build.0 = Release|Any CPU
{3193DABC-87F8-4256-9449-3CF42FEF7098}.Release|x64.ActiveCfg = Release|Any CPU
{3193DABC-87F8-4256-9449-3CF42FEF7098}.Release|x64.Build.0 = Release|Any CPU
{3193DABC-87F8-4256-9449-3CF42FEF7098}.Release|x86.ActiveCfg = Release|Any CPU
{3193DABC-87F8-4256-9449-3CF42FEF7098}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
@@ -574,6 +592,7 @@ Global
{A3166F8A-ECAD-4D4B-9BE3-96FEC799B27B} = {1020167A-4101-496E-82CF-41B65769DD28} {A3166F8A-ECAD-4D4B-9BE3-96FEC799B27B} = {1020167A-4101-496E-82CF-41B65769DD28}
{4647EFB5-A206-4F47-976D-BAED11B52579} = {1020167A-4101-496E-82CF-41B65769DD28} {4647EFB5-A206-4F47-976D-BAED11B52579} = {1020167A-4101-496E-82CF-41B65769DD28}
{4983E15B-3730-4646-A2BD-16B9ECC9E4FF} = {05A45688-7EEF-4656-818A-2477625C3707} {4983E15B-3730-4646-A2BD-16B9ECC9E4FF} = {05A45688-7EEF-4656-818A-2477625C3707}
{3193DABC-87F8-4256-9449-3CF42FEF7098} = {05A45688-7EEF-4656-818A-2477625C3707}
EndGlobalSection EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {9FD7B842-C3E2-4FD0-AD8A-C8E619280AB7} SolutionGuid = {9FD7B842-C3E2-4FD0-AD8A-C8E619280AB7}

View File

@@ -16,7 +16,7 @@
<ResourceDictionary Source="Dictionaries/Images/ImagesBaseView.xaml"/> <ResourceDictionary Source="Dictionaries/Images/ImagesBaseView.xaml"/>
<ResourceDictionary Source="Dictionaries/Images/ImagesHomeView.xaml"/> <ResourceDictionary Source="Dictionaries/Images/ImagesHomeView.xaml"/>
<ResourceDictionary Source="Dictionaries/Images/ImagesHomeDownloadsView.xaml"/> <ResourceDictionary Source="Dictionaries/Images/ImagesHomeDownloadsView.xaml"/>
<ResourceDictionary Source="Dictionaries/Images/ImagesHomePlaylistView.xaml"/> <ResourceDictionary Source="Dictionaries/Images/ImagesHomeVideoCollectionView.xaml"/>
<ResourceDictionary Source="Dictionaries/Images/ImagesHomeVideoView.xaml"/> <ResourceDictionary Source="Dictionaries/Images/ImagesHomeVideoView.xaml"/>
<ResourceDictionary Source="Dictionaries/Images/ImagesSettingsView.xaml"/> <ResourceDictionary Source="Dictionaries/Images/ImagesSettingsView.xaml"/>
</ResourceDictionary.MergedDictionaries> </ResourceDictionary.MergedDictionaries>

View File

@@ -11,16 +11,19 @@ using VDownload.Core.ViewModels.About;
using VDownload.Core.ViewModels.Authentication; using VDownload.Core.ViewModels.Authentication;
using VDownload.Core.ViewModels.Home; using VDownload.Core.ViewModels.Home;
using VDownload.Core.ViewModels.Settings; using VDownload.Core.ViewModels.Settings;
using VDownload.Core.ViewModels.Subscriptions;
using VDownload.Core.Views; using VDownload.Core.Views;
using VDownload.Core.Views.About; using VDownload.Core.Views.About;
using VDownload.Core.Views.Authentication; using VDownload.Core.Views.Authentication;
using VDownload.Core.Views.Home; using VDownload.Core.Views.Home;
using VDownload.Core.Views.Settings; using VDownload.Core.Views.Settings;
using VDownload.Core.Views.Subscriptions;
using VDownload.Services.Data.Application; using VDownload.Services.Data.Application;
using VDownload.Services.Data.Authentication; using VDownload.Services.Data.Authentication;
using VDownload.Services.Data.Configuration; using VDownload.Services.Data.Configuration;
using VDownload.Services.Data.Configuration.Models; using VDownload.Services.Data.Configuration.Models;
using VDownload.Services.Data.Settings; using VDownload.Services.Data.Settings;
using VDownload.Services.Data.Subscriptions;
using VDownload.Services.UI.Dialogs; using VDownload.Services.UI.Dialogs;
using VDownload.Services.UI.DictionaryResources; using VDownload.Services.UI.DictionaryResources;
using VDownload.Services.UI.Notifications; using VDownload.Services.UI.Notifications;
@@ -108,6 +111,7 @@ namespace VDownload
services.AddSingleton<IAuthenticationDataService, AuthenticationDataService>(); services.AddSingleton<IAuthenticationDataService, AuthenticationDataService>();
services.AddSingleton<ISettingsService, SettingsService>(); services.AddSingleton<ISettingsService, SettingsService>();
services.AddSingleton<IApplicationDataService, ApplicationDataService>(); services.AddSingleton<IApplicationDataService, ApplicationDataService>();
services.AddSingleton<ISubscriptionsDataService, SubscriptionsDataService>();
} }
protected void BuildUIServices(IServiceCollection services) protected void BuildUIServices(IServiceCollection services)
@@ -154,8 +158,9 @@ namespace VDownload
services.AddSingleton<SettingsViewModel>(); services.AddSingleton<SettingsViewModel>();
services.AddSingleton<HomeDownloadsViewModel>(); services.AddSingleton<HomeDownloadsViewModel>();
services.AddSingleton<HomeVideoViewModel>(); services.AddSingleton<HomeVideoViewModel>();
services.AddSingleton<HomePlaylistViewModel>(); services.AddSingleton<HomeVideoCollectionViewModel>();
services.AddSingleton<HomeViewModel>(); services.AddSingleton<HomeViewModel>();
services.AddSingleton<SubscriptionsViewModel>();
services.AddSingleton<BaseViewModel>(); services.AddSingleton<BaseViewModel>();
// Views // Views
@@ -164,8 +169,9 @@ namespace VDownload
services.AddTransient<SettingsView>(); services.AddTransient<SettingsView>();
services.AddTransient<HomeDownloadsView>(); services.AddTransient<HomeDownloadsView>();
services.AddTransient<HomeVideoView>(); services.AddTransient<HomeVideoView>();
services.AddTransient<HomePlaylistView>(); services.AddTransient<HomeVideoCollectionView>();
services.AddTransient<HomeView>(); services.AddTransient<HomeView>();
services.AddTransient<SubscriptionsView>();
services.AddTransient<BaseWindow>(); services.AddTransient<BaseWindow>();
} }
@@ -185,7 +191,8 @@ namespace VDownload
IApplicationDataService applicationDataService = _serviceProvider.GetService<IApplicationDataService>(); IApplicationDataService applicationDataService = _serviceProvider.GetService<IApplicationDataService>();
ISettingsService settingsService = _serviceProvider.GetService<ISettingsService>(); ISettingsService settingsService = _serviceProvider.GetService<ISettingsService>();
IAuthenticationDataService authenticationDataService = _serviceProvider.GetService<IAuthenticationDataService>(); IAuthenticationDataService authenticationDataService = _serviceProvider.GetService<IAuthenticationDataService>();
await Task.WhenAll(applicationDataService.Load(), settingsService.Load(), authenticationDataService.Load()); ISubscriptionsDataService subscriptionsDataService = _serviceProvider.GetService<ISubscriptionsDataService>();
await Task.WhenAll(applicationDataService.Load(), settingsService.Load(), authenticationDataService.Load(), subscriptionsDataService.Load());
} }
protected void AssignStaticProperties() protected void AssignStaticProperties()

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

View File

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 40 KiB

View File

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 32 KiB

View File

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

View File

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

View File

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

View File

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

View File

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 41 KiB

View File

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 31 KiB

View File

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

View File

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 46 KiB

View File

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

View File

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 45 KiB

View File

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

View File

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 46 KiB

View File

@@ -6,10 +6,12 @@
<ResourceDictionary.ThemeDictionaries> <ResourceDictionary.ThemeDictionaries>
<ResourceDictionary x:Key="Light"> <ResourceDictionary x:Key="Light">
<SolidColorBrush x:Key="ViewBackgroundColor" Color="#F5F5F5"/> <SolidColorBrush x:Key="ViewBackgroundColor" Color="#F5F5F5"/>
<SolidColorBrush x:Key="PanelBackgroundColor" Color="#F5F5F5"/>
<SolidColorBrush x:Key="OptionBarBackgroundColor" Color="#F5F5F5"/> <SolidColorBrush x:Key="OptionBarBackgroundColor" Color="#F5F5F5"/>
</ResourceDictionary> </ResourceDictionary>
<ResourceDictionary x:Key="Dark"> <ResourceDictionary x:Key="Dark">
<SolidColorBrush x:Key="ViewBackgroundColor" Color="#242424"/> <SolidColorBrush x:Key="ViewBackgroundColor" Color="#242424"/>
<SolidColorBrush x:Key="PanelBackgroundColor" Color="#2F2F2F"/>
<SolidColorBrush x:Key="OptionBarBackgroundColor" Color="#1B1B1B"/> <SolidColorBrush x:Key="OptionBarBackgroundColor" Color="#1B1B1B"/>
</ResourceDictionary> </ResourceDictionary>
</ResourceDictionary.ThemeDictionaries> </ResourceDictionary.ThemeDictionaries>

View File

@@ -13,4 +13,7 @@
<ct:StringFormatConverter x:Key="StringFormatConverter"/> <ct:StringFormatConverter x:Key="StringFormatConverter"/>
<ct:BoolToVisibilityConverter x:Key="BoolToVisibilityConverter"/> <ct:BoolToVisibilityConverter x:Key="BoolToVisibilityConverter"/>
<ct:BoolNegationConverter x:Key="BoolNegationConverter"/> <ct:BoolNegationConverter x:Key="BoolNegationConverter"/>
<ct:EmptyObjectToObjectConverter x:Key="IsNotNullConverter"
EmptyValue="False"
NotEmptyValue="True"/>
</ResourceDictionary> </ResourceDictionary>

View File

@@ -7,11 +7,13 @@
<x:String x:Key="ImageBaseViewAuthentication">/Assets/BaseView/AuthenticationDark.png</x:String> <x:String x:Key="ImageBaseViewAuthentication">/Assets/BaseView/AuthenticationDark.png</x:String>
<x:String x:Key="ImageBaseViewHome">/Assets/BaseView/HomeDark.png</x:String> <x:String x:Key="ImageBaseViewHome">/Assets/BaseView/HomeDark.png</x:String>
<x:String x:Key="ImageBaseViewAbout">/Assets/BaseView/AboutDark.png</x:String> <x:String x:Key="ImageBaseViewAbout">/Assets/BaseView/AboutDark.png</x:String>
<x:String x:Key="ImageBaseViewSubscriptions">/Assets/BaseView/SubscriptionsDark.png</x:String>
</ResourceDictionary> </ResourceDictionary>
<ResourceDictionary x:Key="Light"> <ResourceDictionary x:Key="Light">
<x:String x:Key="ImageBaseViewAuthentication">/Assets/BaseView/AuthenticationLight.png</x:String> <x:String x:Key="ImageBaseViewAuthentication">/Assets/BaseView/AuthenticationLight.png</x:String>
<x:String x:Key="ImageBaseViewHome">/Assets/BaseView/HomeLight.png</x:String> <x:String x:Key="ImageBaseViewHome">/Assets/BaseView/HomeLight.png</x:String>
<x:String x:Key="ImageBaseViewAbout">/Assets/BaseView/AboutLight.png</x:String> <x:String x:Key="ImageBaseViewAbout">/Assets/BaseView/AboutLight.png</x:String>
<x:String x:Key="ImageBaseViewSubscriptions">/Assets/BaseView/SubscriptionsLight.png</x:String>
</ResourceDictionary> </ResourceDictionary>
</ResourceDictionary.ThemeDictionaries> </ResourceDictionary.ThemeDictionaries>
</ResourceDictionary> </ResourceDictionary>

View File

@@ -1,36 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:VDownload.Dictionaries.Images">
<ResourceDictionary.ThemeDictionaries>
<ResourceDictionary x:Key="Light">
<x:String x:Key="ImageHomePlaylistViewAuthor">/Assets/HomePlaylistView/AuthorLight.png</x:String>
<x:String x:Key="ImageHomePlaylistViewDate">/Assets/HomePlaylistView/DateLight.png</x:String>
<x:String x:Key="ImageHomePlaylistViewTime">/Assets/HomePlaylistView/TimeLight.png</x:String>
<x:String x:Key="ImageHomePlaylistViewViews">/Assets/HomePlaylistView/ViewLight.png</x:String>
<x:String x:Key="ImageHomePlaylistViewQuality">/Assets/HomePlaylistView/QualityLight.png</x:String>
<x:String x:Key="ImageHomePlaylistViewMedia">/Assets/HomePlaylistView/MediaLight.png</x:String>
<x:String x:Key="ImageHomePlaylistViewTrimLeft">/Assets/HomePlaylistView/TrimLeftLight.png</x:String>
<x:String x:Key="ImageHomePlaylistViewTrim">/Assets/HomePlaylistView/TrimLight.png</x:String>
<x:String x:Key="ImageHomePlaylistViewTrimRight">/Assets/HomePlaylistView/TrimRightLight.png</x:String>
<x:String x:Key="ImageHomePlaylistViewDirectory">/Assets/HomePlaylistView/DirectoryLight.png</x:String>
<x:String x:Key="ImageHomePlaylistViewFilename">/Assets/HomePlaylistView/FilenameLight.png</x:String>
<x:String x:Key="ImageHomePlaylistViewExtension">/Assets/HomePlaylistView/ExtensionLight.png</x:String>
</ResourceDictionary>
<ResourceDictionary x:Key="Dark">
<x:String x:Key="ImageHomePlaylistViewAuthor">/Assets/HomePlaylistView/AuthorDark.png</x:String>
<x:String x:Key="ImageHomePlaylistViewDate">/Assets/HomePlaylistView/DateDark.png</x:String>
<x:String x:Key="ImageHomePlaylistViewTime">/Assets/HomePlaylistView/TimeDark.png</x:String>
<x:String x:Key="ImageHomePlaylistViewViews">/Assets/HomePlaylistView/ViewDark.png</x:String>
<x:String x:Key="ImageHomePlaylistViewQuality">/Assets/HomePlaylistView/QualityDark.png</x:String>
<x:String x:Key="ImageHomePlaylistViewMedia">/Assets/HomePlaylistView/MediaDark.png</x:String>
<x:String x:Key="ImageHomePlaylistViewTrimLeft">/Assets/HomePlaylistView/TrimLeftDark.png</x:String>
<x:String x:Key="ImageHomePlaylistViewTrim">/Assets/HomePlaylistView/TrimDark.png</x:String>
<x:String x:Key="ImageHomePlaylistViewTrimRight">/Assets/HomePlaylistView/TrimRightDark.png</x:String>
<x:String x:Key="ImageHomePlaylistViewDirectory">/Assets/HomePlaylistView/DirectoryDark.png</x:String>
<x:String x:Key="ImageHomePlaylistViewFilename">/Assets/HomePlaylistView/FilenameDark.png</x:String>
<x:String x:Key="ImageHomePlaylistViewExtension">/Assets/HomePlaylistView/ExtensionDark.png</x:String>
</ResourceDictionary>
</ResourceDictionary.ThemeDictionaries>
</ResourceDictionary>

View File

@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<ResourceDictionary.ThemeDictionaries>
<ResourceDictionary x:Key="Light">
<x:String x:Key="ImageHomeVideoCollectionViewAuthor">/Assets/HomeVideoCollectionView/AuthorLight.png</x:String>
<x:String x:Key="ImageHomeVideoCollectionViewDate">/Assets/HomeVideoCollectionView/DateLight.png</x:String>
<x:String x:Key="ImageHomeVideoCollectionViewTime">/Assets/HomeVideoCollectionView/TimeLight.png</x:String>
<x:String x:Key="ImageHomeVideoCollectionViewViews">/Assets/HomeVideoCollectionView/ViewLight.png</x:String>
<x:String x:Key="ImageHomeVideoCollectionViewQuality">/Assets/HomeVideoCollectionView/QualityLight.png</x:String>
<x:String x:Key="ImageHomeVideoCollectionViewMedia">/Assets/HomeVideoCollectionView/MediaLight.png</x:String>
<x:String x:Key="ImageHomeVideoCollectionViewTrimLeft">/Assets/HomeVideoCollectionView/TrimLeftLight.png</x:String>
<x:String x:Key="ImageHomeVideoCollectionViewTrim">/Assets/HomeVideoCollectionView/TrimLight.png</x:String>
<x:String x:Key="ImageHomeVideoCollectionViewTrimRight">/Assets/HomeVideoCollectionView/TrimRightLight.png</x:String>
<x:String x:Key="ImageHomeVideoCollectionViewDirectory">/Assets/HomeVideoCollectionView/DirectoryLight.png</x:String>
<x:String x:Key="ImageHomeVideoCollectionViewFilename">/Assets/HomeVideoCollectionView/FilenameLight.png</x:String>
<x:String x:Key="ImageHomeVideoCollectionViewExtension">/Assets/HomeVideoCollectionView/ExtensionLight.png</x:String>
</ResourceDictionary>
<ResourceDictionary x:Key="Dark">
<x:String x:Key="ImageHomeVideoCollectionViewAuthor">/Assets/HomeVideoCollectionView/AuthorDark.png</x:String>
<x:String x:Key="ImageHomeVideoCollectionViewDate">/Assets/HomeVideoCollectionView/DateDark.png</x:String>
<x:String x:Key="ImageHomeVideoCollectionViewTime">/Assets/HomeVideoCollectionView/TimeDark.png</x:String>
<x:String x:Key="ImageHomeVideoCollectionViewViews">/Assets/HomeVideoCollectionView/ViewDark.png</x:String>
<x:String x:Key="ImageHomeVideoCollectionViewQuality">/Assets/HomeVideoCollectionView/QualityDark.png</x:String>
<x:String x:Key="ImageHomeVideoCollectionViewMedia">/Assets/HomeVideoCollectionView/MediaDark.png</x:String>
<x:String x:Key="ImageHomeVideoCollectionViewTrimLeft">/Assets/HomeVideoCollectionView/TrimLeftDark.png</x:String>
<x:String x:Key="ImageHomeVideoCollectionViewTrim">/Assets/HomeVideoCollectionView/TrimDark.png</x:String>
<x:String x:Key="ImageHomeVideoCollectionViewTrimRight">/Assets/HomeVideoCollectionView/TrimRightDark.png</x:String>
<x:String x:Key="ImageHomeVideoCollectionViewDirectory">/Assets/HomeVideoCollectionView/DirectoryDark.png</x:String>
<x:String x:Key="ImageHomeVideoCollectionViewFilename">/Assets/HomeVideoCollectionView/FilenameDark.png</x:String>
<x:String x:Key="ImageHomeVideoCollectionViewExtension">/Assets/HomeVideoCollectionView/ExtensionDark.png</x:String>
</ResourceDictionary>
</ResourceDictionary.ThemeDictionaries>
</ResourceDictionary>

View File

@@ -49,26 +49,26 @@
<Content Remove="Assets\HomeDownloadsView\QueuedLight.png" /> <Content Remove="Assets\HomeDownloadsView\QueuedLight.png" />
<Content Remove="Assets\HomeDownloadsView\TimeDark.png" /> <Content Remove="Assets\HomeDownloadsView\TimeDark.png" />
<Content Remove="Assets\HomeDownloadsView\TimeLight.png" /> <Content Remove="Assets\HomeDownloadsView\TimeLight.png" />
<Content Remove="Assets\HomePlaylistView\AuthorDark.png" /> <Content Remove="Assets\HomeVideoCollectionView\AuthorDark.png" />
<Content Remove="Assets\HomePlaylistView\AuthorLight.png" /> <Content Remove="Assets\HomeVideoCollectionView\AuthorLight.png" />
<Content Remove="Assets\HomePlaylistView\DateDark.png" /> <Content Remove="Assets\HomeVideoCollectionView\DateDark.png" />
<Content Remove="Assets\HomePlaylistView\DateLight.png" /> <Content Remove="Assets\HomeVideoCollectionView\DateLight.png" />
<Content Remove="Assets\HomePlaylistView\DirectoryDark.png" /> <Content Remove="Assets\HomeVideoCollectionView\DirectoryDark.png" />
<Content Remove="Assets\HomePlaylistView\DirectoryLight.png" /> <Content Remove="Assets\HomeVideoCollectionView\DirectoryLight.png" />
<Content Remove="Assets\HomePlaylistView\ExtensionDark.png" /> <Content Remove="Assets\HomeVideoCollectionView\ExtensionDark.png" />
<Content Remove="Assets\HomePlaylistView\ExtensionLight.png" /> <Content Remove="Assets\HomeVideoCollectionView\ExtensionLight.png" />
<Content Remove="Assets\HomePlaylistView\FilenameDark.png" /> <Content Remove="Assets\HomeVideoCollectionView\FilenameDark.png" />
<Content Remove="Assets\HomePlaylistView\FilenameLight.png" /> <Content Remove="Assets\HomeVideoCollectionView\FilenameLight.png" />
<Content Remove="Assets\HomePlaylistView\MediaDark.png" /> <Content Remove="Assets\HomeVideoCollectionView\MediaDark.png" />
<Content Remove="Assets\HomePlaylistView\MediaLight.png" /> <Content Remove="Assets\HomeVideoCollectionView\MediaLight.png" />
<Content Remove="Assets\HomePlaylistView\QualityDark.png" /> <Content Remove="Assets\HomeVideoCollectionView\QualityDark.png" />
<Content Remove="Assets\HomePlaylistView\QualityLight.png" /> <Content Remove="Assets\HomeVideoCollectionView\QualityLight.png" />
<Content Remove="Assets\HomePlaylistView\TimeDark.png" /> <Content Remove="Assets\HomeVideoCollectionView\TimeDark.png" />
<Content Remove="Assets\HomePlaylistView\TimeLight.png" /> <Content Remove="Assets\HomeVideoCollectionView\TimeLight.png" />
<Content Remove="Assets\HomePlaylistView\TrimDark.png" /> <Content Remove="Assets\HomeVideoCollectionView\TrimDark.png" />
<Content Remove="Assets\HomePlaylistView\TrimLight.png" /> <Content Remove="Assets\HomeVideoCollectionView\TrimLight.png" />
<Content Remove="Assets\HomePlaylistView\ViewDark.png" /> <Content Remove="Assets\HomeVideoCollectionView\ViewDark.png" />
<Content Remove="Assets\HomePlaylistView\ViewLight.png" /> <Content Remove="Assets\HomeVideoCollectionView\ViewLight.png" />
<Content Remove="Assets\HomeVideoView\AuthorDark.png" /> <Content Remove="Assets\HomeVideoView\AuthorDark.png" />
<Content Remove="Assets\HomeVideoView\AuthorLight.png" /> <Content Remove="Assets\HomeVideoView\AuthorLight.png" />
<Content Remove="Assets\HomeVideoView\DateDark.png" /> <Content Remove="Assets\HomeVideoView\DateDark.png" />
@@ -154,7 +154,7 @@
<None Remove="Dictionaries\Converters.xaml" /> <None Remove="Dictionaries\Converters.xaml" />
<None Remove="Dictionaries\Images\ImagesBaseView.xaml" /> <None Remove="Dictionaries\Images\ImagesBaseView.xaml" />
<None Remove="Dictionaries\Images\ImagesHomeDownloadsView.xaml" /> <None Remove="Dictionaries\Images\ImagesHomeDownloadsView.xaml" />
<None Remove="Dictionaries\Images\ImagesHomePlaylistView.xaml" /> <None Remove="Dictionaries\Images\ImagesHomeVideoCollectionView.xaml" />
<None Remove="Dictionaries\Images\ImagesHomeVideoView.xaml" /> <None Remove="Dictionaries\Images\ImagesHomeVideoView.xaml" />
<None Remove="Dictionaries\Images\ImagesHomeView.xaml" /> <None Remove="Dictionaries\Images\ImagesHomeView.xaml" />
<None Remove="Dictionaries\Images\ImagesLogo.xaml" /> <None Remove="Dictionaries\Images\ImagesLogo.xaml" />
@@ -192,6 +192,7 @@
<ProjectReference Include="..\VDownload.Services\VDownload.Services.Data\VDownload.Services.Data.Authentication\VDownload.Services.Data.Authentication.csproj" /> <ProjectReference Include="..\VDownload.Services\VDownload.Services.Data\VDownload.Services.Data.Authentication\VDownload.Services.Data.Authentication.csproj" />
<ProjectReference Include="..\VDownload.Services\VDownload.Services.Data\VDownload.Services.Data.Configuration\VDownload.Services.Data.Configuration.csproj" /> <ProjectReference Include="..\VDownload.Services\VDownload.Services.Data\VDownload.Services.Data.Configuration\VDownload.Services.Data.Configuration.csproj" />
<ProjectReference Include="..\VDownload.Services\VDownload.Services.Data\VDownload.Services.Data.Settings\VDownload.Services.Data.Settings.csproj" /> <ProjectReference Include="..\VDownload.Services\VDownload.Services.Data\VDownload.Services.Data.Settings\VDownload.Services.Data.Settings.csproj" />
<ProjectReference Include="..\VDownload.Services\VDownload.Services.Data\VDownload.Services.Data.Subscriptions\VDownload.Services.Data.Subscriptions.csproj" />
<ProjectReference Include="..\VDownload.Services\VDownload.Services.UI\VDownload.Services.UI.Dialogs\VDownload.Services.UI.Dialogs.csproj" /> <ProjectReference Include="..\VDownload.Services\VDownload.Services.UI\VDownload.Services.UI.Dialogs\VDownload.Services.UI.Dialogs.csproj" />
<ProjectReference Include="..\VDownload.Services\VDownload.Services.UI\VDownload.Services.UI.DictionaryResources\VDownload.Services.UI.DictionaryResources.csproj" /> <ProjectReference Include="..\VDownload.Services\VDownload.Services.UI\VDownload.Services.UI.DictionaryResources\VDownload.Services.UI.DictionaryResources.csproj" />
<ProjectReference Include="..\VDownload.Services\VDownload.Services.UI\VDownload.Services.UI.Notifications\VDownload.Services.UI.Notifications.csproj" /> <ProjectReference Include="..\VDownload.Services\VDownload.Services.UI\VDownload.Services.UI.Notifications\VDownload.Services.UI.Notifications.csproj" />
@@ -214,6 +215,12 @@
<Content Update="Assets\BaseView\AboutLight.png"> <Content Update="Assets\BaseView\AboutLight.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content> </Content>
<Content Update="Assets\BaseView\SubscriptionsDark.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Update="Assets\BaseView\SubscriptionsLight.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Update="Assets\HomeVideoView\QualityDark.png"> <Content Update="Assets\HomeVideoView\QualityDark.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content> </Content>
@@ -372,64 +379,64 @@
<None Update="Assets\HomeDownloadsView\TimeLight.png"> <None Update="Assets\HomeDownloadsView\TimeLight.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None> </None>
<None Update="Assets\HomePlaylistView\AuthorDark.png"> <None Update="Assets\HomeVideoCollectionView\AuthorDark.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None> </None>
<None Update="Assets\HomePlaylistView\AuthorLight.png"> <None Update="Assets\HomeVideoCollectionView\AuthorLight.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None> </None>
<None Update="Assets\HomePlaylistView\DateDark.png"> <None Update="Assets\HomeVideoCollectionView\DateDark.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None> </None>
<None Update="Assets\HomePlaylistView\DateLight.png"> <None Update="Assets\HomeVideoCollectionView\DateLight.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None> </None>
<None Update="Assets\HomePlaylistView\DirectoryDark.png"> <None Update="Assets\HomeVideoCollectionView\DirectoryDark.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None> </None>
<None Update="Assets\HomePlaylistView\DirectoryLight.png"> <None Update="Assets\HomeVideoCollectionView\DirectoryLight.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None> </None>
<None Update="Assets\HomePlaylistView\ExtensionDark.png"> <None Update="Assets\HomeVideoCollectionView\ExtensionDark.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None> </None>
<None Update="Assets\HomePlaylistView\ExtensionLight.png"> <None Update="Assets\HomeVideoCollectionView\ExtensionLight.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None> </None>
<None Update="Assets\HomePlaylistView\FilenameDark.png"> <None Update="Assets\HomeVideoCollectionView\FilenameDark.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None> </None>
<None Update="Assets\HomePlaylistView\FilenameLight.png"> <None Update="Assets\HomeVideoCollectionView\FilenameLight.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None> </None>
<None Update="Assets\HomePlaylistView\MediaDark.png"> <None Update="Assets\HomeVideoCollectionView\MediaDark.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None> </None>
<None Update="Assets\HomePlaylistView\MediaLight.png"> <None Update="Assets\HomeVideoCollectionView\MediaLight.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None> </None>
<None Update="Assets\HomePlaylistView\QualityDark.png"> <None Update="Assets\HomeVideoCollectionView\QualityDark.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None> </None>
<None Update="Assets\HomePlaylistView\QualityLight.png"> <None Update="Assets\HomeVideoCollectionView\QualityLight.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None> </None>
<None Update="Assets\HomePlaylistView\TimeDark.png"> <None Update="Assets\HomeVideoCollectionView\TimeDark.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None> </None>
<None Update="Assets\HomePlaylistView\TimeLight.png"> <None Update="Assets\HomeVideoCollectionView\TimeLight.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None> </None>
<None Update="Assets\HomePlaylistView\TrimDark.png"> <None Update="Assets\HomeVideoCollectionView\TrimDark.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None> </None>
<None Update="Assets\HomePlaylistView\TrimLight.png"> <None Update="Assets\HomeVideoCollectionView\TrimLight.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None> </None>
<None Update="Assets\HomePlaylistView\ViewDark.png"> <None Update="Assets\HomeVideoCollectionView\ViewDark.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None> </None>
<None Update="Assets\HomePlaylistView\ViewLight.png"> <None Update="Assets\HomeVideoCollectionView\ViewLight.png">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None> </None>
<None Update="Assets\HomeVideoView\AuthorDark.png"> <None Update="Assets\HomeVideoView\AuthorDark.png">
@@ -534,7 +541,7 @@
<Page Update="Dictionaries\Images\ImagesOther.xaml"> <Page Update="Dictionaries\Images\ImagesOther.xaml">
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
</Page> </Page>
<Page Update="Dictionaries\Images\ImagesHomePlaylistView.xaml"> <Page Update="Dictionaries\Images\ImagesHomeVideoCollectionView.xaml">
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
</Page> </Page>
<Page Update="Dictionaries\Images\ImagesHomeDownloadsView.xaml"> <Page Update="Dictionaries\Images\ImagesHomeDownloadsView.xaml">

View File

@@ -147,7 +147,8 @@
"directory_name": "VDownload", "directory_name": "VDownload",
"authentication_file": "authentication.json", "authentication_file": "authentication.json",
"settings_file": "settings.json", "settings_file": "settings.json",
"data_file": "data.json" "data_file": "data.json",
"subscriptions_file": "subscriptions.json"
}, },
"temp": { "temp": {
"tasks_directory": "tasks" "tasks_directory": "tasks"