diff --git a/CHANGELOG.md b/CHANGELOG.md index 31868ed..ef9e1da 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # 更新日志 +* `2022/03/07` v1.5.0-alpha2 + 1. [优化] 重构程序架构,解决一些已知问题。 + 2. [优化] 界面UI的显示与操作。 + 3. [新增] 文件命名格式:avid、bvid、cid、UP主信息、视频发布时间。 + 4. [修复] 视频音质列表导致的闪退问题。 + 5. [修复] 图片下载导致的闪退问题。 + * `2022/03/05` v1.5.0-alpha1 1. [优化] 重构程序架构,解决一些已知问题。 2. [新增] 最高支持8K视频。 diff --git a/README.md b/README.md index 3400e67..1e67aff 100644 --- a/README.md +++ b/README.md @@ -9,22 +9,19 @@ [全部更新日志](CHANGELOG.md) -* `2022/03/05` v1.5.0-alpha1 +* `2022/03/07` v1.5.0-alpha2 1. [优化] 重构程序架构,解决一些已知问题。 - 2. [新增] 最高支持8K视频。 - 3. [新增] 支持杜比全景声和杜比视界。 - 4. [新增] 支持字幕下载。 - 5. [新增] 支持部分短链接(如 https://b23.tv/BV17x411w7KC )。 - 6. [新增] 下载内容可选,可根据需要选择下载视频、音频、弹幕、字幕、封面。 - 7. [新增] 下载文件命名模块,可自主设置文件名。 + 2. [优化] 界面UI的显示与操作。 + 3. [新增] 文件命名格式:avid、bvid、cid、UP主信息、视频发布时间。 + 4. [修复] 视频音质列表导致的闪退问题。 + 5. [修复] 图片下载导致的闪退问题。 ## 下载 -- [哔哩下载姬最新版](https://github.com/FlySelfLog/downkyi/releases/download/v1.5.0-alpha1/DownKyi-1.5.0-alpha1.zip) +- [哔哩下载姬最新版](https://github.com/FlySelfLog/downkyi/releases/download/v1.5.0-alpha2/DownKyi-1.5.0-alpha2.zip) - [下载页面](https://github.com/FlySelfLog/downkyi/releases) - ## 赞助 如果这个项目对您有很大帮助,并且您希望支持该项目的开发和维护,请随时扫描一下二维码进行捐赠。非常感谢您的捐款,谢谢! diff --git a/src/DownKyi.Core/BiliApi/BiliUtils/Constant.cs b/src/DownKyi.Core/BiliApi/BiliUtils/Constant.cs index 070adfb..23dba62 100644 --- a/src/DownKyi.Core/BiliApi/BiliUtils/Constant.cs +++ b/src/DownKyi.Core/BiliApi/BiliUtils/Constant.cs @@ -33,7 +33,10 @@ namespace DownKyi.Core.BiliApi.BiliUtils /// public static List GetResolutions() { - return resolutions; + // 使用深复制, + // 保证外部修改list后, + // 不会影响其他调用处 + return new List(resolutions); } /// @@ -42,7 +45,10 @@ namespace DownKyi.Core.BiliApi.BiliUtils /// public static List GetAudioQualities() { - return qualities; + // 使用深复制, + // 保证外部修改list后, + // 不会影响其他调用处 + return new List(qualities); } } diff --git a/src/DownKyi.Core/BiliApi/BiliUtils/ParseEntrance.cs b/src/DownKyi.Core/BiliApi/BiliUtils/ParseEntrance.cs index e4112e4..360e829 100644 --- a/src/DownKyi.Core/BiliApi/BiliUtils/ParseEntrance.cs +++ b/src/DownKyi.Core/BiliApi/BiliUtils/ParseEntrance.cs @@ -7,13 +7,13 @@ namespace DownKyi.Core.BiliApi.BiliUtils /// 解析输入的字符串 /// 支持的格式有: /// av号:av170001, AV170001, https://www.bilibili.com/video/av170001 - /// BV号:BV17x411w7KC, https://www.bilibili.com/video/BV17x411w7KC + /// BV号:BV17x411w7KC, https://www.bilibili.com/video/BV17x411w7KC, https://b23.tv/BV17x411w7KC /// 番剧(电影、电视剧)ss号:ss32982, SS32982, https://www.bilibili.com/bangumi/play/ss32982 /// 番剧(电影、电视剧)ep号:ep317925, EP317925, https://www.bilibili.com/bangumi/play/ep317925 /// 番剧(电影、电视剧)md号:md28228367, MD28228367, https://www.bilibili.com/bangumi/media/md28228367 /// 课程ss号:https://www.bilibili.com/cheese/play/ss205 /// 课程ep号:https://www.bilibili.com/cheese/play/ep3489 - /// 收藏夹:ml1329019876, ML1329019876, https://www.bilibili.com/medialist/detail/ml1329019876 + /// 收藏夹:ml1329019876, ML1329019876, https://www.bilibili.com/medialist/detail/ml1329019876, https://www.bilibili.com/medialist/play/ml1329019876/ /// 用户空间:uid928123, UID928123, uid:928123, UID:928123, https://space.bilibili.com/928123 /// public static class ParseEntrance diff --git a/src/DownKyi.Core/FileName/FileName.cs b/src/DownKyi.Core/FileName/FileName.cs index 23d9c1d..2e8684d 100644 --- a/src/DownKyi.Core/FileName/FileName.cs +++ b/src/DownKyi.Core/FileName/FileName.cs @@ -15,6 +15,15 @@ namespace DownKyi.Core.FileName private string videoQuality = "VIDEO_QUALITY"; private string videoCodec = "VIDEO_CODEC"; + private string videoPublishTime = "VIDEO_PUBLISH_TIME"; + + private long avid = -1; + private string bvid = "BVID"; + private long cid = -1; + + private long upMid = -1; + private string upName = "UP_NAME"; + private FileName(List nameParts) { this.nameParts = nameParts; @@ -73,6 +82,42 @@ namespace DownKyi.Core.FileName return this; } + public FileName SetVideoPublishTime(string videoPublishTime) + { + this.videoPublishTime = videoPublishTime; + return this; + } + + public FileName SetAvid(long avid) + { + this.avid = avid; + return this; + } + + public FileName SetBvid(string bvid) + { + this.bvid = bvid; + return this; + } + + public FileName SetCid(long cid) + { + this.cid = cid; + return this; + } + + public FileName SetUpMid(long upMid) + { + this.upMid = upMid; + return this; + } + + public FileName SetUpName(string upName) + { + this.upName = upName; + return this; + } + public string RelativePath() { string path = string.Empty; @@ -112,6 +157,24 @@ namespace DownKyi.Core.FileName case FileNamePart.VIDEO_CODEC: path += videoCodec; break; + case FileNamePart.VIDEO_PUBLISH_TIME: + path += videoPublishTime; + break; + case FileNamePart.AVID: + path += avid; + break; + case FileNamePart.BVID: + path += bvid; + break; + case FileNamePart.CID: + path += cid; + break; + case FileNamePart.UP_MID: + path += upMid; + break; + case FileNamePart.UP_NAME: + path += upName; + break; } if (((int)part) >= 100) diff --git a/src/DownKyi.Core/FileName/FileNamePart.cs b/src/DownKyi.Core/FileName/FileNamePart.cs index 551829c..059e408 100644 --- a/src/DownKyi.Core/FileName/FileNamePart.cs +++ b/src/DownKyi.Core/FileName/FileNamePart.cs @@ -12,6 +12,15 @@ VIDEO_QUALITY, VIDEO_CODEC, + VIDEO_PUBLISH_TIME, + + AVID, + BVID, + CID, + + UP_MID, + UP_NAME, + // 斜杠 SLASH = 100, diff --git a/src/DownKyi.Core/Storage/StorageCover.cs b/src/DownKyi.Core/Storage/StorageCover.cs index ce45c31..a1556aa 100644 --- a/src/DownKyi.Core/Storage/StorageCover.cs +++ b/src/DownKyi.Core/Storage/StorageCover.cs @@ -165,12 +165,14 @@ namespace DownKyi.Core.Storage { string destFile = $"{StorageManager.GetCover()}/{md5}"; - // 如果不存在 - if (!File.Exists(destFile)) + try { - // 移动到指定位置 - File.Move(localFile, destFile); + File.Delete(destFile); } + catch { } + + // 移动到指定位置 + File.Move(localFile, destFile); return md5; } diff --git a/src/DownKyi.Core/Storage/StorageHeader.cs b/src/DownKyi.Core/Storage/StorageHeader.cs index d38ff91..09a768a 100644 --- a/src/DownKyi.Core/Storage/StorageHeader.cs +++ b/src/DownKyi.Core/Storage/StorageHeader.cs @@ -28,7 +28,7 @@ namespace DownKyi.Core.Storage public BitmapImage GetHeaderThumbnail(long mid, string name, string url, int width, int height) { string header = GetHeader(mid, name, url); - if(header == null) { return null; } + if (header == null) { return null; } return GetHeaderThumbnail(header, width, height); } @@ -42,6 +42,8 @@ namespace DownKyi.Core.Storage /// public BitmapImage GetHeaderThumbnail(string header, int width, int height) { + if (header == null) { return null; } + var bitmap = new Bitmap(header); var thumbnail = bitmap.GetThumbnailImage(width, height, null, IntPtr.Zero); @@ -141,7 +143,16 @@ namespace DownKyi.Core.Storage if (File.Exists(localFile)) { - File.Move(localFile, $"{StorageManager.GetHeader()}/{md5}"); + string destFile = $"{StorageManager.GetHeader()}/{md5}"; + + try + { + File.Delete(destFile); + } + catch { } + + // 移动到指定位置 + File.Move(localFile, destFile); return md5; } diff --git a/src/DownKyi/Languages/Default.xaml b/src/DownKyi/Languages/Default.xaml index ea63788..a590212 100644 --- a/src/DownKyi/Languages/Default.xaml +++ b/src/DownKyi/Languages/Default.xaml @@ -214,7 +214,10 @@ 音质 画质 视频编码 + 视频发布时间 空格 + UP主ID + UP主昵称 恢复默认 弹幕 diff --git a/src/DownKyi/Models/AppInfo.cs b/src/DownKyi/Models/AppInfo.cs index f34dd70..c2ec5e5 100644 --- a/src/DownKyi/Models/AppInfo.cs +++ b/src/DownKyi/Models/AppInfo.cs @@ -3,12 +3,12 @@ public class AppInfo { public string Name { get; } = "哔哩下载姬"; - public int VersionCode { get; } = 500; + public int VersionCode { get; } = 501; #if DEBUG - public string VersionName { get; } = "1.5.0-alpha1 Debug"; + public string VersionName { get; } = "1.5.0-alpha2 Debug"; #else - public string VersionName { get; } = "1.5.0-alpha1"; + public string VersionName { get; } = "1.5.0-alpha2"; #endif } diff --git a/src/DownKyi/Services/BangumiInfoService.cs b/src/DownKyi/Services/BangumiInfoService.cs index 270c0d4..a11443f 100644 --- a/src/DownKyi/Services/BangumiInfoService.cs +++ b/src/DownKyi/Services/BangumiInfoService.cs @@ -99,6 +99,32 @@ namespace DownKyi.Services Name = name, Duration = "N/A" }; + + // UP主信息 + if (bangumiSeason.UpInfo != null) + { + page.Owner = new Core.BiliApi.Models.VideoOwner + { + Name = bangumiSeason.UpInfo.Name, + Face = bangumiSeason.UpInfo.Avatar, + Mid = bangumiSeason.UpInfo.Mid, + }; + } + else + { + page.Owner = new Core.BiliApi.Models.VideoOwner + { + Name = "", + Face = "", + Mid = -1, + }; + } + + // 视频发布时间 + DateTime startTime = TimeZone.CurrentTimeZone.ToLocalTime(new DateTime(1970, 1, 1)); // 当地时区 + DateTime dateTime = startTime.AddSeconds(episode.PubTime); + page.PublishTime = dateTime.ToString("yyyy-MM-dd"); + pages.Add(page); } diff --git a/src/DownKyi/Services/CheeseInfoService.cs b/src/DownKyi/Services/CheeseInfoService.cs index 359e11a..a49e925 100644 --- a/src/DownKyi/Services/CheeseInfoService.cs +++ b/src/DownKyi/Services/CheeseInfoService.cs @@ -67,6 +67,32 @@ namespace DownKyi.Services Name = name, Duration = "N/A" }; + + // UP主信息 + if (cheeseView.UpInfo != null) + { + page.Owner = new Core.BiliApi.Models.VideoOwner + { + Name = cheeseView.UpInfo.Name, + Face = cheeseView.UpInfo.Avatar, + Mid = cheeseView.UpInfo.Mid, + }; + } + else + { + page.Owner = new Core.BiliApi.Models.VideoOwner + { + Name = "", + Face = "", + Mid = -1, + }; + } + + // 视频发布时间 + DateTime startTime = TimeZone.CurrentTimeZone.ToLocalTime(new DateTime(1970, 1, 1)); // 当地时区 + DateTime dateTime = startTime.AddSeconds(episode.ReleaseDate); + page.PublishTime = dateTime.ToString("yyyy-MM-dd"); + pages.Add(page); } diff --git a/src/DownKyi/Services/Download/AddToDownloadService.cs b/src/DownKyi/Services/Download/AddToDownloadService.cs index 939dcf6..f4b4ad3 100644 --- a/src/DownKyi/Services/Download/AddToDownloadService.cs +++ b/src/DownKyi/Services/Download/AddToDownloadService.cs @@ -294,7 +294,13 @@ namespace DownKyi.Services.Download .SetVideoZone(videoInfoView.VideoZone.Split('>')[0]) .SetAudioQuality(page.AudioQualityFormat) .SetVideoQuality(page.VideoQuality == null ? "" : page.VideoQuality.QualityFormat) - .SetVideoCodec(page.VideoQuality == null ? "" : page.VideoQuality.SelectedVideoCodec.Contains("AVC") ? "AVC" : page.VideoQuality.SelectedVideoCodec.Contains("HEVC") ? "HEVC" : page.VideoQuality.SelectedVideoCodec.Contains("Dolby") ? "Dolby Vision" : ""); + .SetVideoCodec(page.VideoQuality == null ? "" : page.VideoQuality.SelectedVideoCodec.Contains("AVC") ? "AVC" : page.VideoQuality.SelectedVideoCodec.Contains("HEVC") ? "HEVC" : page.VideoQuality.SelectedVideoCodec.Contains("Dolby") ? "Dolby Vision" : "") + .SetVideoPublishTime(page.PublishTime) + .SetAvid(page.Avid) + .SetBvid(page.Bvid) + .SetCid(page.Cid) + .SetUpMid(page.Owner.Mid) + .SetUpName(page.Owner.Name); string filePath = Path.Combine(directory, fileName.RelativePath()); // 视频类别 diff --git a/src/DownKyi/Services/SearchService.cs b/src/DownKyi/Services/SearchService.cs index d1badbc..4b77404 100644 --- a/src/DownKyi/Services/SearchService.cs +++ b/src/DownKyi/Services/SearchService.cs @@ -11,7 +11,7 @@ namespace DownKyi.Services /// 解析支持的输入, /// 支持的格式有: /// av号:av170001, AV170001, https://www.bilibili.com/video/av170001 - /// BV号:BV17x411w7KC, https://www.bilibili.com/video/BV17x411w7KC + /// BV号:BV17x411w7KC, https://www.bilibili.com/video/BV17x411w7KC, https://b23.tv/BV17x411w7KC /// 番剧(电影、电视剧)ss号:ss32982, SS32982, https://www.bilibili.com/bangumi/play/ss32982 /// 番剧(电影、电视剧)ep号:ep317925, EP317925, https://www.bilibili.com/bangumi/play/ep317925 /// 番剧(电影、电视剧)md号:md28228367, MD28228367, https://www.bilibili.com/bangumi/media/md28228367 diff --git a/src/DownKyi/Services/Utils.cs b/src/DownKyi/Services/Utils.cs index 25f9725..13f1206 100644 --- a/src/DownKyi/Services/Utils.cs +++ b/src/DownKyi/Services/Utils.cs @@ -165,7 +165,10 @@ namespace DownKyi.Services if (videoQualityExist == null) { List videoCodecList = new List(); - ListHelper.AddUnique(videoCodecList, codecName); + if (codecName != string.Empty) + { + ListHelper.AddUnique(videoCodecList, codecName); + } VideoQuality videoQuality = new VideoQuality() { @@ -179,12 +182,24 @@ namespace DownKyi.Services { if (!videoQualityList[videoQualityList.IndexOf(videoQualityExist)].VideoCodecList.Exists(t => t.Equals(codecName))) { - videoQualityList[videoQualityList.IndexOf(videoQualityExist)].VideoCodecList.Add(codecName); + if (codecName != string.Empty) + { + videoQualityList[videoQualityList.IndexOf(videoQualityExist)].VideoCodecList.Add(codecName); + } } } // 设置选中的视频编码 VideoQuality selectedVideoQuality = videoQualityList.FirstOrDefault(t => t.Quality == video.Id); + if(selectedVideoQuality == null) { continue; } + + if (videoQualityList[videoQualityList.IndexOf(selectedVideoQuality)].VideoCodecList.Count == 1) + { + // 当获取的视频没有设置的视频编码时,执行 + videoQualityList[videoQualityList.IndexOf(selectedVideoQuality)].SelectedVideoCodec = videoQualityList[videoQualityList.IndexOf(selectedVideoQuality)].VideoCodecList[0]; + } + + // 设置选中的视频编码 switch (videoCodecs) { case VideoCodecs.AVC: @@ -205,11 +220,6 @@ namespace DownKyi.Services break; } - if (videoQualityList[videoQualityList.IndexOf(selectedVideoQuality)].VideoCodecList.Count == 1) - { - // 当获取的视频没有设置的视频编码时,执行 - videoQualityList[videoQualityList.IndexOf(selectedVideoQuality)].SelectedVideoCodec = videoQualityList[videoQualityList.IndexOf(selectedVideoQuality)].VideoCodecList[0]; - } } return videoQualityList; diff --git a/src/DownKyi/Services/VideoInfoService.cs b/src/DownKyi/Services/VideoInfoService.cs index 3bec45f..bd927a3 100644 --- a/src/DownKyi/Services/VideoInfoService.cs +++ b/src/DownKyi/Services/VideoInfoService.cs @@ -83,6 +83,24 @@ namespace DownKyi.Services Name = name, Duration = "N/A" }; + + // UP主信息 + videoPage.Owner = videoView.Owner; + if (videoPage.Owner == null) + { + videoPage.Owner = new Core.BiliApi.Models.VideoOwner + { + Name = "", + Face = "", + Mid = -1, + }; + } + + // 视频发布时间 + DateTime startTime = TimeZone.CurrentTimeZone.ToLocalTime(new DateTime(1970, 1, 1)); // 当地时区 + DateTime dateTime = startTime.AddSeconds(videoView.Pubdate); + videoPage.PublishTime = dateTime.ToString("yyyy-MM-dd"); + videoPages.Add(videoPage); } diff --git a/src/DownKyi/ViewModels/PageViewModels/VideoPage.cs b/src/DownKyi/ViewModels/PageViewModels/VideoPage.cs index be645a9..b7660d0 100644 --- a/src/DownKyi/ViewModels/PageViewModels/VideoPage.cs +++ b/src/DownKyi/ViewModels/PageViewModels/VideoPage.cs @@ -1,8 +1,11 @@ using DownKyi.Core.BiliApi.BiliUtils; +using DownKyi.Core.BiliApi.Models; using DownKyi.Core.BiliApi.VideoStream.Models; +using DownKyi.Core.Logging; using DownKyi.Core.Utils; using Prism.Commands; using Prism.Mvvm; +using System; using System.Collections.Generic; using System.Collections.ObjectModel; @@ -16,6 +19,8 @@ namespace DownKyi.ViewModels.PageViewModels public string Bvid { get; set; } public long Cid { get; set; } public long EpisodeId { get; set; } + public VideoOwner Owner { get; set; } + public string PublishTime { get; set; } public string FirstFrame { get; set; } @@ -87,7 +92,18 @@ namespace DownKyi.ViewModels.PageViewModels private void ExecuteVideoQualitySelectedCommand() { // 杜比视界 - string dolby = Constant.GetAudioQualities()[3].Name; + string dolby = string.Empty; + try + { + var qualities = Constant.GetAudioQualities(); + dolby = qualities[3].Name; + } + catch (Exception e) + { + Core.Utils.Debugging.Console.PrintLine("ExecuteVideoQualitySelectedCommand()发生异常: {0}", e); + LogManager.Error("ExecuteVideoQualitySelectedCommand", e); + } + if (VideoQuality != null && VideoQuality.Quality == 126) { ListHelper.AddUnique(AudioQualityFormatList, dolby); @@ -101,7 +117,6 @@ namespace DownKyi.ViewModels.PageViewModels AudioQualityFormat = AudioQualityFormatList[0]; } } - } #endregion diff --git a/src/DownKyi/ViewModels/Settings/ViewVideoViewModel.cs b/src/DownKyi/ViewModels/Settings/ViewVideoViewModel.cs index a36ac6d..002d20f 100644 --- a/src/DownKyi/ViewModels/Settings/ViewVideoViewModel.cs +++ b/src/DownKyi/ViewModels/Settings/ViewVideoViewModel.cs @@ -469,6 +469,24 @@ namespace DownKyi.ViewModels.Settings case FileNamePart.VIDEO_CODEC: display = DictionaryResource.GetString("DisplayVideoCodec"); break; + case FileNamePart.VIDEO_PUBLISH_TIME: + display = DictionaryResource.GetString("DisplayVideoPublishTime"); + break; + case FileNamePart.AVID: + display = "avid"; + break; + case FileNamePart.BVID: + display = "bvid"; + break; + case FileNamePart.CID: + display = "cid"; + break; + case FileNamePart.UP_MID: + display = DictionaryResource.GetString("DisplayUpMid"); + break; + case FileNamePart.UP_NAME: + display = DictionaryResource.GetString("DisplayUpName"); + break; } if (((int)item) >= 100) diff --git a/src/DownKyi/ViewModels/ViewChannelViewModel.cs b/src/DownKyi/ViewModels/ViewChannelViewModel.cs index 89d3087..4d5de5a 100644 --- a/src/DownKyi/ViewModels/ViewChannelViewModel.cs +++ b/src/DownKyi/ViewModels/ViewChannelViewModel.cs @@ -297,6 +297,7 @@ namespace DownKyi.ViewModels } Medias.Clear(); + IsSelectAll = false; LoadingVisibility = Visibility.Visible; NoDataVisibility = Visibility.Collapsed; diff --git a/src/DownKyi/ViewModels/ViewMyBangumiFollowViewModel.cs b/src/DownKyi/ViewModels/ViewMyBangumiFollowViewModel.cs index e4e0058..e082410 100644 --- a/src/DownKyi/ViewModels/ViewMyBangumiFollowViewModel.cs +++ b/src/DownKyi/ViewModels/ViewMyBangumiFollowViewModel.cs @@ -190,6 +190,9 @@ namespace DownKyi.ViewModels { if (!(parameter is TabHeader tabHeader)) { return; } + // 顶部tab点击后,隐藏Content + ContentVisibility = Visibility.Collapsed; + // 页面选择 Pager = new CustomPagerViewModel(1, 1); Pager.CurrentChanged += OnCurrentChanged_Pager; @@ -354,6 +357,8 @@ namespace DownKyi.ViewModels private async void UpdateBangumiMediaList(int current) { Medias.Clear(); + IsSelectAll = false; + LoadingVisibility = Visibility.Visible; NoDataVisibility = Visibility.Collapsed; diff --git a/src/DownKyi/ViewModels/ViewMyFavoritesViewModel.cs b/src/DownKyi/ViewModels/ViewMyFavoritesViewModel.cs index ddc2702..ce93ace 100644 --- a/src/DownKyi/ViewModels/ViewMyFavoritesViewModel.cs +++ b/src/DownKyi/ViewModels/ViewMyFavoritesViewModel.cs @@ -80,6 +80,14 @@ namespace DownKyi.ViewModels set => SetProperty(ref mediaLoading, value); } + private Visibility mediaContentVisibility; + public Visibility MediaContentVisibility + { + get => mediaContentVisibility; + set => SetProperty(ref mediaContentVisibility, value); + } + + private Visibility mediaLoadingVisibility; public Visibility MediaLoadingVisibility { @@ -211,6 +219,9 @@ namespace DownKyi.ViewModels { if (!(parameter is TabHeader tabHeader)) { return; } + // tab点击后,隐藏MediaContent + MediaContentVisibility = Visibility.Collapsed; + // 页面选择 Pager = new CustomPagerViewModel(1, (int)Math.Ceiling(double.Parse(tabHeader.SubTitle) / VideoNumberInPage)); Pager.CurrentChanged += OnCurrentChanged_Pager; @@ -375,6 +386,8 @@ namespace DownKyi.ViewModels private async void UpdateFavoritesMediaList(int current) { Medias.Clear(); + IsSelectAll = false; + MediaLoadingVisibility = Visibility.Visible; MediaNoDataVisibility = Visibility.Collapsed; @@ -391,11 +404,13 @@ namespace DownKyi.ViewModels List medias = FavoritesResource.GetFavoritesMedia(tab.Id, current, VideoNumberInPage); if (medias == null || medias.Count == 0) { + MediaContentVisibility = Visibility.Visible; MediaLoadingVisibility = Visibility.Collapsed; MediaNoDataVisibility = Visibility.Visible; return; } + MediaContentVisibility = Visibility.Visible; MediaLoadingVisibility = Visibility.Collapsed; MediaNoDataVisibility = Visibility.Collapsed; diff --git a/src/DownKyi/ViewModels/ViewPublicationViewModel.cs b/src/DownKyi/ViewModels/ViewPublicationViewModel.cs index c7b4fdd..854004c 100644 --- a/src/DownKyi/ViewModels/ViewPublicationViewModel.cs +++ b/src/DownKyi/ViewModels/ViewPublicationViewModel.cs @@ -334,6 +334,7 @@ namespace DownKyi.ViewModels } Medias.Clear(); + IsSelectAll = false; LoadingVisibility = Visibility.Visible; NoDataVisibility = Visibility.Collapsed; diff --git a/src/DownKyi/Views/ViewMyFavorites.xaml b/src/DownKyi/Views/ViewMyFavorites.xaml index 58c4aeb..97e73df 100644 --- a/src/DownKyi/Views/ViewMyFavorites.xaml +++ b/src/DownKyi/Views/ViewMyFavorites.xaml @@ -221,7 +221,10 @@ - + @@ -268,27 +271,6 @@ - - - - - - - - @@ -340,6 +322,28 @@ Style="{StaticResource BtnStyle}" /> + + + + + + + + + diff --git a/src/README.md b/src/README.md index 8eb8c0a..17635bf 100644 --- a/src/README.md +++ b/src/README.md @@ -16,6 +16,8 @@ - [x] 支持封面下载 +- [x] 支持自定义文件命名 + - [x] 支持断点续传 - [x] 支持Aria2c @@ -60,7 +62,7 @@ 目前已支持的有: - [x] av号:av170001,https://www.bilibili.com/video/av170001 -- [x] BV号:BV17x411w7KC,https://www.bilibili.com/video/BV17x411w7KC +- [x] BV号:BV17x411w7KC,https://www.bilibili.com/video/BV17x411w7KC, https://b23.tv/BV17x411w7KC - [x] 番剧(电影、电视剧)ss号:https://www.bilibili.com/bangumi/play/ss32982 - [x] 番剧(电影、电视剧)ep号:https://www.bilibili.com/bangumi/play/ep317925 - [x] 番剧(电影、电视剧)md号:https://www.bilibili.com/bangumi/media/md28228367