mirror of
https://github.com/Crunchy-DL/Crunchy-Downloader.git
synced 2026-04-20 16:32:07 +00:00
Add - Added **completion sound** when downloads finish, allowing a specified sound to be played Add - Added **changelog** for easier tracking of changes and updates Add - Added **Retry button** to reset all failed downloads, allowing "Auto Download" to restart them Add - Added **dub/sub info** to the Upcoming tab Chg - Changed **history table view** to include missing features from the poster view Chg - Changed and **adjusted error messages** Chg - Changed **chapters formatting** for consistent output across locales Chg - Changed **Clear Queue** button to icon-only Chg - Changed **update button** behavior Chg - Changed some **error messages** for better debugging Chg - Changed **history series access**, now allowing it to open while others are refreshing Chg - Changed **device ID reuse** to fix continuous login emails Chg - Changed **authentication log** to write the full message for better debugging Chg - Updated **dependencies** Fix - Temporary fix for **authentication issues** Fix - Fixed **unable to download movies** [#237](https://github.com/Crunchy-DL/Crunchy-Downloader/issues/237) Fix - Fixed **buggy queue behavior** during active downloads Fix - Fixed **duplicate seasons in history** when adding multiple episodes from the calendar Fix - Fixed crash if **all** subtitles option is selected Fix - Fixed "**Cannot set download directory to Drive**" https://github.com/Crunchy-DL/Crunchy-Downloader/issues/220 Fix - Fixed missing **subtitles and none subs** for some series
341 lines
No EOL
20 KiB
XML
341 lines
No EOL
20 KiB
XML
<UserControl xmlns="https://github.com/avaloniaui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:vm="clr-namespace:CRD.ViewModels"
|
|
xmlns:controls="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia"
|
|
xmlns:structs="clr-namespace:CRD.Utils.Structs"
|
|
xmlns:ui="clr-namespace:CRD.Utils.UI"
|
|
x:DataType="vm:UpcomingPageViewModel"
|
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
|
x:Class="CRD.Views.UpcomingPageView">
|
|
|
|
<UserControl.Resources>
|
|
<ui:UiListToStringConverter x:Key="UiListToStringConverter" />
|
|
<ui:UiListHasElementsConverter x:Key="UiListHasElementsConverter" />
|
|
</UserControl.Resources>
|
|
|
|
<Grid>
|
|
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<Grid Grid.Row="0" HorizontalAlignment="Stretch" VerticalAlignment="Top" Margin="10">
|
|
<!-- Define columns: one for centering and one for the right-aligned content -->
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" /> <!-- For centering the ItemsControl -->
|
|
<ColumnDefinition Width="Auto" /> <!-- For the settings StackPanel -->
|
|
</Grid.ColumnDefinitions>
|
|
<ItemsControl ItemsSource="{Binding Seasons}" HorizontalAlignment="Center">
|
|
<ItemsControl.ItemsPanel>
|
|
<ItemsPanelTemplate>
|
|
<StackPanel Orientation="Horizontal" />
|
|
</ItemsPanelTemplate>
|
|
</ItemsControl.ItemsPanel>
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate DataType="{x:Type structs:SeasonViewModel}">
|
|
<Button
|
|
Width="120"
|
|
Height="50"
|
|
HorizontalContentAlignment="Center"
|
|
Command="{Binding $parent[UserControl].((vm:UpcomingPageViewModel)DataContext).SelectSeasonCommand}"
|
|
CommandParameter="{Binding}"
|
|
Margin="5">
|
|
|
|
<Button.Content>
|
|
<StackPanel Orientation="Vertical" VerticalAlignment="Center" HorizontalAlignment="Center">
|
|
<TextBlock IsVisible="{Binding IsSelected}" Text="{Binding Season}" FontSize="16" FontWeight="Bold" HorizontalAlignment="Center" />
|
|
<TextBlock IsVisible="{Binding !IsSelected}" Foreground="Gray" Text="{Binding Season}" FontSize="16" FontWeight="Bold" HorizontalAlignment="Center" />
|
|
<TextBlock Text="{Binding Year}" FontSize="12" HorizontalAlignment="Center" />
|
|
</StackPanel>
|
|
</Button.Content>
|
|
|
|
</Button>
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
|
|
<StackPanel Grid.Column="1" Margin="10" HorizontalAlignment="Right" VerticalAlignment="Center">
|
|
|
|
<StackPanel>
|
|
<ToggleButton x:Name="DropdownButtonSorting" Width="50" Height="50"
|
|
BorderThickness="0" VerticalAlignment="Center"
|
|
IsEnabled="{Binding !IsLoading}"
|
|
IsChecked="{Binding SortingSelectionOpen}">
|
|
<StackPanel Orientation="Vertical">
|
|
<controls:SymbolIcon Symbol="Sort" FontSize="25" />
|
|
<TextBlock Text="Sort" HorizontalAlignment="Center" FontSize="12"></TextBlock>
|
|
</StackPanel>
|
|
</ToggleButton>
|
|
<Popup IsLightDismissEnabled="True"
|
|
IsOpen="{Binding IsChecked, ElementName=DropdownButtonSorting, Mode=TwoWay}"
|
|
Placement="BottomEdgeAlignedRight"
|
|
PlacementTarget="{Binding ElementName=DropdownButtonSorting}">
|
|
<Border BorderThickness="1" Background="{DynamicResource ComboBoxDropDownBackground}">
|
|
<ListBox SelectionMode="Single,Toggle" Width="210"
|
|
MaxHeight="400"
|
|
ItemsSource="{Binding SortingList}" SelectedItem="{Binding SelectedSorting}">
|
|
<ListBox.ItemTemplate>
|
|
<DataTemplate>
|
|
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Left">
|
|
<controls:SymbolIcon IsVisible="{Binding !$parent[UserControl].((vm:UpcomingPageViewModel)DataContext).SortDir}" Symbol="ChevronUp" FontSize="12" Margin="0 0 10 0" />
|
|
<controls:SymbolIcon IsVisible="{Binding $parent[UserControl].((vm:UpcomingPageViewModel)DataContext).SortDir}" Symbol="ChevronDown" FontSize="12" Margin="0 0 10 0" />
|
|
<TextBlock Text="{Binding SortingTitle}"></TextBlock>
|
|
</StackPanel>
|
|
</DataTemplate>
|
|
</ListBox.ItemTemplate>
|
|
</ListBox>
|
|
</Border>
|
|
</Popup>
|
|
</StackPanel>
|
|
|
|
|
|
<!-- <ToggleButton x:Name="CalendarSettings" HorizontalContentAlignment="Stretch"> -->
|
|
<!-- <StackPanel Orientation="Horizontal"> -->
|
|
<!-- <controls:SymbolIcon Symbol="Settings" FontSize="18" /> -->
|
|
<!-- </StackPanel> -->
|
|
<!-- </ToggleButton> -->
|
|
<!-- <Popup IsLightDismissEnabled="True" -->
|
|
<!-- MaxWidth="400" -->
|
|
<!-- MaxHeight="600" -->
|
|
<!-- IsOpen="{Binding IsChecked, ElementName=CalendarSettings, Mode=TwoWay}" -->
|
|
<!-- Placement="Bottom" -->
|
|
<!-- PlacementTarget="{Binding ElementName=CalendarSettings}"> -->
|
|
<!-- <Border BorderThickness="1" Background="{DynamicResource ComboBoxDropDownBackground}"> -->
|
|
<!-- -->
|
|
<!-- <StackPanel> -->
|
|
<!-- -->
|
|
<!-- </StackPanel> -->
|
|
<!-- -->
|
|
<!-- </Border> -->
|
|
<!-- </Popup> -->
|
|
|
|
</StackPanel>
|
|
|
|
</Grid>
|
|
|
|
|
|
<ListBox Grid.Row="1" IsVisible="{Binding !IsLoading}" ItemsSource="{Binding SelectedSeason}"
|
|
SelectedItem="{Binding SelectedSeries, Mode=TwoWay}" SelectedIndex="{Binding SelectedIndex}" SelectionChanged="SelectionChanged"
|
|
Margin="5">
|
|
|
|
<ListBox.ItemsPanel>
|
|
<ItemsPanelTemplate>
|
|
<WrapPanel Orientation="Horizontal"></WrapPanel>
|
|
</ItemsPanelTemplate>
|
|
</ListBox.ItemsPanel>
|
|
|
|
<!-- <ListBox.Styles> -->
|
|
<!-- <Style Selector="ListBoxItem:selected /template/ ContentPresenter"> -->
|
|
<!-- <Setter Property="Background" Value="Transparent"/> -->
|
|
<!-- </Style> -->
|
|
<!-- <Style Selector="ListBoxItem:selected /template/ Rectangle"> -->
|
|
<!-- <Setter Property="IsVisible" Value="False"/> -->
|
|
<!-- </Style> -->
|
|
<!-- </ListBox.Styles> -->
|
|
|
|
<ListBox.ItemTemplate>
|
|
<DataTemplate>
|
|
|
|
<Grid>
|
|
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="185" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
|
<Expander Grid.Column="0" Grid.ColumnSpan="2" ExpandDirection="Right" IsExpanded="{Binding IsExpanded}">
|
|
<Expander.Styles>
|
|
<Style Selector="Expander:not(:expanded) /template/ ToggleButton#ExpanderHeader">
|
|
<Setter Property="Background" Value="Transparent" />
|
|
<Setter Property="BorderBrush" Value="Transparent" />
|
|
</Style>
|
|
<Style Selector="Expander:expanded /template/ ToggleButton#ExpanderHeader">
|
|
<Setter Property="Background" Value="Transparent" />
|
|
<Setter Property="BorderBrush" Value="Transparent" />
|
|
</Style>
|
|
<Style Selector="ToggleButton:pointerover /template/ Border#ExpandCollapseChevronBorder">
|
|
<Setter Property="Background" Value="Transparent" />
|
|
</Style>
|
|
<Style Selector="ToggleButton:not(:checked) /template/ TextBlock#ExpandCollapseChevron">
|
|
<Setter Property="Foreground" Value="Transparent" />
|
|
</Style>
|
|
<Style Selector="ToggleButton:checked /template/ TextBlock#ExpandCollapseChevron">
|
|
<Setter Property="Foreground" Value="Transparent" />
|
|
</Style>
|
|
</Expander.Styles>
|
|
<Expander.Header>
|
|
<Border Width="117" Height="315" />
|
|
</Expander.Header>
|
|
<Expander.Content>
|
|
|
|
<StackPanel>
|
|
|
|
<ScrollViewer MaxHeight="265" MinHeight="265" PointerWheelChanged="ScrollViewer_PointerWheelChanged" Margin="0 0 0 5">
|
|
<TextBlock HorizontalAlignment="Center" TextAlignment="Center"
|
|
Text="{Binding Description}"
|
|
TextWrapping="Wrap"
|
|
Width="185"
|
|
FontSize="16"
|
|
Margin="5">
|
|
</TextBlock>
|
|
</ScrollViewer>
|
|
|
|
|
|
<Grid MaxWidth="185" IsVisible="{Binding AudioLocales, Converter={StaticResource UiListHasElementsConverter}}">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<!-- Dubs -->
|
|
<TextBlock Grid.Row="0" Grid.Column="0"
|
|
FontStyle="Italic"
|
|
FontSize="12"
|
|
Opacity="0.8"
|
|
Text="Dubs: " />
|
|
<TextBlock Grid.Row="0" Grid.Column="1"
|
|
FontStyle="Italic"
|
|
FontSize="12"
|
|
Opacity="0.8"
|
|
Text="{Binding AudioLocales, Converter={StaticResource UiListToStringConverter}}"
|
|
TextWrapping="NoWrap" />
|
|
|
|
<!-- Subs -->
|
|
<TextBlock Grid.Row="1" Grid.Column="0"
|
|
FontStyle="Italic"
|
|
FontSize="12"
|
|
Opacity="0.8"
|
|
Text="Subs: " />
|
|
<TextBlock Grid.Row="1" Grid.Column="1"
|
|
FontStyle="Italic"
|
|
FontSize="12"
|
|
Opacity="0.8"
|
|
Text="{Binding SubtitleLocales, Converter={StaticResource UiListToStringConverter}}"
|
|
TextWrapping="NoWrap" />
|
|
|
|
<ToolTip.Tip>
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<!-- Dubs -->
|
|
<TextBlock Grid.Row="0" Grid.Column="0"
|
|
FontSize="17"
|
|
Text="Dubs: " />
|
|
<TextBlock Grid.Row="0" Grid.Column="1"
|
|
FontSize="17"
|
|
Text="{Binding AudioLocales, Converter={StaticResource UiListToStringConverter}}"
|
|
TextWrapping="Wrap" />
|
|
|
|
<!-- Subs -->
|
|
<TextBlock Grid.Row="1" Grid.Column="0"
|
|
FontSize="17"
|
|
Text="Subs: " />
|
|
<TextBlock Grid.Row="1" Grid.Column="1"
|
|
FontSize="17"
|
|
Text="{Binding SubtitleLocales, Converter={StaticResource UiListToStringConverter}}"
|
|
TextWrapping="Wrap" />
|
|
|
|
|
|
</Grid>
|
|
</ToolTip.Tip>
|
|
</Grid>
|
|
|
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Bottom">
|
|
<Button HorizontalAlignment="Right" VerticalAlignment="Bottom" Content="Trailer" Margin=" 0 0 5 0"
|
|
Command="{Binding $parent[UserControl].((vm:UpcomingPageViewModel)DataContext).OpenTrailer}"
|
|
CommandParameter="{Binding}">
|
|
</Button>
|
|
<StackPanel IsVisible="{Binding HasCrID}">
|
|
<Button HorizontalAlignment="Right" VerticalAlignment="Bottom"
|
|
IsVisible="{Binding !IsInHistory}"
|
|
Command="{Binding $parent[UserControl].((vm:UpcomingPageViewModel)DataContext).AddToHistory}"
|
|
CommandParameter="{Binding}">
|
|
<StackPanel Orientation="Horizontal">
|
|
<controls:SymbolIcon Symbol="Library" FontSize="20" />
|
|
<controls:SymbolIcon Symbol="Add" FontSize="20" />
|
|
</StackPanel>
|
|
</Button>
|
|
</StackPanel>
|
|
|
|
|
|
</StackPanel>
|
|
</StackPanel>
|
|
</Expander.Content>
|
|
</Expander>
|
|
|
|
|
|
<StackPanel Grid.Column="0" Orientation="Vertical" HorizontalAlignment="Center"
|
|
Width="185"
|
|
Height="315"
|
|
Margin="5">
|
|
<Grid>
|
|
<Image Source="{Binding ThumbnailImage}"
|
|
Width="185"
|
|
Height="265">
|
|
</Image>
|
|
|
|
<StackPanel VerticalAlignment="Top" HorizontalAlignment="Right"
|
|
IsVisible="{Binding IsInHistory}" Margin="0 5 5 5">
|
|
<Border Background="DarkGray" CornerRadius="50">
|
|
<controls:SymbolIcon Symbol="Library" Foreground="Black" FontSize="22" Margin="2" />
|
|
<ToolTip.Tip>
|
|
<TextBlock Text="Series is in History" FontSize="15" />
|
|
</ToolTip.Tip>
|
|
</Border>
|
|
</StackPanel>
|
|
|
|
</Grid>
|
|
|
|
<TextBlock HorizontalAlignment="Center" TextAlignment="Center"
|
|
Text="{Binding Title.English}"
|
|
TextWrapping="Wrap"
|
|
Width="185"
|
|
FontSize="12"
|
|
Height="35"
|
|
Margin="4,0,4,0">
|
|
<ToolTip.Tip>
|
|
<TextBlock Text="{Binding Title.English}" FontSize="15" />
|
|
</ToolTip.Tip>
|
|
</TextBlock>
|
|
|
|
<TextBlock HorizontalAlignment="Center" TextAlignment="Center"
|
|
Text="{Binding StartDateForm}"
|
|
TextWrapping="Wrap"
|
|
Width="185"
|
|
FontSize="12"
|
|
MaxHeight="20"
|
|
Margin="4,0,4,0">
|
|
<ToolTip.Tip>
|
|
<TextBlock Text="{Binding StartDateForm}" FontSize="15" />
|
|
</ToolTip.Tip>
|
|
</TextBlock>
|
|
|
|
</StackPanel>
|
|
|
|
</Grid>
|
|
|
|
</DataTemplate>
|
|
</ListBox.ItemTemplate>
|
|
</ListBox>
|
|
|
|
<controls:ProgressRing Grid.Row="1" IsVisible="{Binding IsLoading}" VerticalAlignment="Center" HorizontalAlignment="Center" Width="100" Height="100"></controls:ProgressRing>
|
|
|
|
</Grid>
|
|
</UserControl> |