修复Publication页面的一些问题

croire 3 years ago
parent f52230166d
commit b6e993e1e3

@ -261,6 +261,10 @@ namespace DownKyi.ViewModels
#endregion #endregion
/// <summary>
/// 添加到下载
/// </summary>
/// <param name="isOnlySelected"></param>
private async void AddToDownload(bool isOnlySelected) private async void AddToDownload(bool isOnlySelected)
{ {
// 收藏夹里只有视频 // 收藏夹里只有视频
@ -364,7 +368,7 @@ namespace DownKyi.ViewModels
BitmapImage cover; BitmapImage cover;
if (coverUrl == null || coverUrl == "") if (coverUrl == null || coverUrl == "")
{ {
cover = new BitmapImage(new Uri($"pack://application:,,,/Resources/video-placeholder.png")); cover = null; // new BitmapImage(new Uri($"pack://application:,,,/Resources/video-placeholder.png"));
} }
else else
{ {
@ -398,7 +402,7 @@ namespace DownKyi.ViewModels
{ {
Avid = video.Aid, Avid = video.Aid,
Bvid = video.Bvid, Bvid = video.Bvid,
Cover = cover, Cover = cover ?? new BitmapImage(new Uri($"pack://application:,,,/Resources/video-placeholder.png")),
Duration = video.Length, Duration = video.Length,
Title = video.Title, Title = video.Title,
PlayNumber = play, PlayNumber = play,

@ -41,12 +41,12 @@
<Border <Border
HorizontalAlignment="Right" HorizontalAlignment="Right"
VerticalAlignment="Bottom" VerticalAlignment="Bottom"
Background="#7F000000" Background="{DynamicResource BrushMask}"
CornerRadius="5 0 5 0"> CornerRadius="5 0 5 0">
<TextBlock <TextBlock
Name="nameDuration" Name="nameDuration"
Padding="6,0" Padding="6,0"
Foreground="White" Foreground="{DynamicResource BrushText}"
Text="{Binding Duration}" /> Text="{Binding Duration}" />
</Border> </Border>
</Grid> </Grid>
@ -57,7 +57,7 @@
Height="35" Height="35"
MaxWidth="190" MaxWidth="190"
Margin="0,10,0,0" Margin="0,10,0,0"
Foreground="Black" Foreground="{DynamicResource BrushTextDark}"
Tag="{Binding Bvid}" Tag="{Binding Bvid}"
Text="{Binding Title}" Text="{Binding Title}"
TextTrimming="CharacterEllipsis" TextTrimming="CharacterEllipsis"
@ -83,7 +83,7 @@
Source="/DownKyi;component/Resources/play.png" /> Source="/DownKyi;component/Resources/play.png" />
<TextBlock <TextBlock
Margin="5,0,0,0" Margin="5,0,0,0"
Foreground="#FF999999" Foreground="{DynamicResource BrushTextGrey}"
Text="{Binding PlayNumber}" /> Text="{Binding PlayNumber}" />
</StackPanel> </StackPanel>
<StackPanel Grid.Column="1" Orientation="Horizontal"> <StackPanel Grid.Column="1" Orientation="Horizontal">
@ -93,7 +93,7 @@
Source="/DownKyi;component/Resources/time.png" /> Source="/DownKyi;component/Resources/time.png" />
<TextBlock <TextBlock
Margin="5,0,0,0" Margin="5,0,0,0"
Foreground="#FF999999" Foreground="{DynamicResource BrushTextGrey}"
Text="{Binding CreateTime}" /> Text="{Binding CreateTime}" />
</StackPanel> </StackPanel>
</Grid> </Grid>

Loading…
Cancel
Save