From aaae6352bcb509eb9072979763779af9d5b5831e Mon Sep 17 00:00:00 2001 From: croire <1432593898@qq.com> Date: Sun, 16 Oct 2022 22:14:27 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=BE=9D=E8=B5=96?= =?UTF-8?q?=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DatabaseManager/DatabaseManager.csproj | 2 +- DownKyi.Core.Test/DownKyi.Core.Test.csproj | 12 ++++++------ DownKyi.Core.Test/app.config | 4 ++++ DownKyi.Core.Test/packages.config | 4 ++-- DownKyi.Core/DownKyi.Core.csproj | 12 ++++++------ DownKyi.Core/app.config | 4 ++++ DownKyi.Core/packages.config | 6 +++--- 7 files changed, 26 insertions(+), 18 deletions(-) diff --git a/DatabaseManager/DatabaseManager.csproj b/DatabaseManager/DatabaseManager.csproj index 343a04e..cf3f451 100644 --- a/DatabaseManager/DatabaseManager.csproj +++ b/DatabaseManager/DatabaseManager.csproj @@ -127,7 +127,7 @@ - + 1.0.112.2 diff --git a/DownKyi.Core.Test/DownKyi.Core.Test.csproj b/DownKyi.Core.Test/DownKyi.Core.Test.csproj index 9a7c6c4..fcaf273 100644 --- a/DownKyi.Core.Test/DownKyi.Core.Test.csproj +++ b/DownKyi.Core.Test/DownKyi.Core.Test.csproj @@ -1,6 +1,6 @@  - + Debug @@ -56,10 +56,10 @@ - ..\packages\MSTest.TestFramework.2.2.8\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.dll + ..\packages\MSTest.TestFramework.2.2.10\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.dll - ..\packages\MSTest.TestFramework.2.2.8\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll + ..\packages\MSTest.TestFramework.2.2.10\lib\net45\Microsoft.VisualStudio.TestPlatform.TestFramework.Extensions.dll ..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll @@ -104,10 +104,10 @@ 这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。 - - + + - + \ No newline at end of file diff --git a/DownKyi.Core.Test/app.config b/DownKyi.Core.Test/app.config index ef24f15..396ef7d 100644 --- a/DownKyi.Core.Test/app.config +++ b/DownKyi.Core.Test/app.config @@ -9,6 +9,10 @@ + + + + \ No newline at end of file diff --git a/DownKyi.Core.Test/packages.config b/DownKyi.Core.Test/packages.config index 82bdd21..b73e1b4 100644 --- a/DownKyi.Core.Test/packages.config +++ b/DownKyi.Core.Test/packages.config @@ -1,7 +1,7 @@  - - + + \ No newline at end of file diff --git a/DownKyi.Core/DownKyi.Core.csproj b/DownKyi.Core/DownKyi.Core.csproj index 0c61a49..6c0a7a7 100644 --- a/DownKyi.Core/DownKyi.Core.csproj +++ b/DownKyi.Core/DownKyi.Core.csproj @@ -52,8 +52,8 @@ ..\packages\Brotli.NET.2.1.1\lib\net45\Brotli.Core.dll - - ..\packages\Google.Protobuf.3.20.1\lib\net45\Google.Protobuf.dll + + ..\packages\Google.Protobuf.3.21.7\lib\net45\Google.Protobuf.dll ..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll @@ -73,8 +73,8 @@ - - ..\packages\System.Memory.4.5.4\lib\net461\System.Memory.dll + + ..\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll @@ -388,9 +388,9 @@ - + - + \ No newline at end of file diff --git a/DownKyi.Core/app.config b/DownKyi.Core/app.config index 1696df6..a1e2bff 100644 --- a/DownKyi.Core/app.config +++ b/DownKyi.Core/app.config @@ -6,6 +6,10 @@ + + + + \ No newline at end of file diff --git a/DownKyi.Core/packages.config b/DownKyi.Core/packages.config index cb9cf13..1c30c53 100644 --- a/DownKyi.Core/packages.config +++ b/DownKyi.Core/packages.config @@ -1,13 +1,13 @@  - - + + - + From a95014cee5d97babbce8b29a972a9e22d4cea8f3 Mon Sep 17 00:00:00 2001 From: croire <1432593898@qq.com> Date: Thu, 20 Oct 2022 16:14:19 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=91=BD=E5=90=8D?= =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E6=97=A0AV1=E7=BC=96=E7=A0=81=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DownKyi/Services/Download/AddToDownloadService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DownKyi/Services/Download/AddToDownloadService.cs b/DownKyi/Services/Download/AddToDownloadService.cs index c90519d..3783fc9 100644 --- a/DownKyi/Services/Download/AddToDownloadService.cs +++ b/DownKyi/Services/Download/AddToDownloadService.cs @@ -304,14 +304,14 @@ namespace DownKyi.Services.Download // 文件路径 List fileNameParts = SettingsManager.GetInstance().GetFileNameParts(); - FileName fileName = FileName.Builder(fileNameParts) + FileName fileName = FileName.Builder(fileNameParts) .SetSection(Format.FormatFileName(sectionName)) .SetMainTitle(Format.FormatFileName(videoInfoView.Title)) .SetPageTitle(Format.FormatFileName(page.Name)) .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" : page.VideoQuality.SelectedVideoCodec.Contains("AV1") ? "AV1" : "") .SetVideoPublishTime(page.PublishTime) .SetAvid(page.Avid) .SetBvid(page.Bvid) From 79ccebf16050b1d7d98daccbd1c792ae8d3ab2ba Mon Sep 17 00:00:00 2001 From: croire <1432593898@qq.com> Date: Thu, 20 Oct 2022 22:30:46 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E4=BC=98=E5=85=88=E8=A7=A3=E6=9E=90?= =?UTF-8?q?=E8=A7=86=E9=A2=91=E7=BC=96=E7=A0=81=E9=A1=BA=E5=BA=8F=E4=B8=BA?= =?UTF-8?q?AV1=E3=80=81HEVC=E3=80=81AVC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DownKyi/Services/Utils.cs | 85 ++++++++------------------------------- 1 file changed, 16 insertions(+), 69 deletions(-) diff --git a/DownKyi/Services/Utils.cs b/DownKyi/Services/Utils.cs index b3e055a..732f305 100644 --- a/DownKyi/Services/Utils.cs +++ b/DownKyi/Services/Utils.cs @@ -89,40 +89,6 @@ namespace DownKyi.Services } } - /// - /// 设置音质 - /// - /// - /// - /// - private static ObservableCollection GetAudioQualityFormatList_old(PlayUrl playUrl, int defaultAudioQuality) - { - List audioQualityFormatList = new List(); - - if (playUrl.Dash.Audio == null) - { - return new ObservableCollection(); - } - - foreach (PlayUrlDashVideo audio in playUrl.Dash.Audio) - { - // 音质id大于设置画质时,跳过 - if (audio.Id > defaultAudioQuality) { continue; } - - Quality audioQuality = Constant.GetAudioQualities().FirstOrDefault(t => { return t.Id == audio.Id; }); - if (audioQuality != null) - { - ListHelper.AddUnique(audioQualityFormatList, audioQuality.Name); - } - } - - audioQualityFormatList.Sort(new StringLogicalComparer()); - audioQualityFormatList.Reverse(); - - return new ObservableCollection(audioQualityFormatList); - } - - /// /// 设置音质 /// @@ -244,52 +210,33 @@ namespace DownKyi.Services 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: - // if (videoQualityList[videoQualityList.IndexOf(selectedVideoQuality)].VideoCodecList.Contains("H.264/AVC")) - // { - // videoQualityList[videoQualityList.IndexOf(selectedVideoQuality)].SelectedVideoCodec = "H.264/AVC"; - // } - // break; - // case VideoCodecs.HEVC: - // if (videoQualityList[videoQualityList.IndexOf(selectedVideoQuality)].VideoCodecList.Contains("H.265/HEVC")) - // { - // videoQualityList[videoQualityList.IndexOf(selectedVideoQuality)].SelectedVideoCodec = "H.265/HEVC"; - // } - // break; - // case VideoCodecs.NONE: - // break; - // default: - // break; - //} string videoCodecsName = codeIds.FirstOrDefault(t => t.Id == videoCodecs).Name; if (videoQualityList[videoQualityList.IndexOf(selectedVideoQuality)].VideoCodecList.Contains(videoCodecsName)) { videoQualityList[videoQualityList.IndexOf(selectedVideoQuality)].SelectedVideoCodec = videoCodecsName; } + else + { + // 当获取的视频没有设置的视频编码时 + foreach (Quality codec in codeIds) + { + if (videoQualityList[videoQualityList.IndexOf(selectedVideoQuality)].VideoCodecList.Contains(codec.Name)) + { + videoQualityList[videoQualityList.IndexOf(selectedVideoQuality)].SelectedVideoCodec = codec.Name; + } + + if (codec.Id == videoCodecs) + { + break; + } + } + } } return videoQualityList; } - /// - /// 根据输入的字符串判断是AVC还是HEVC - /// - /// - /// - //internal static string GetVideoCodecName(string origin) - //{ - // return origin.Contains("avc") ? "H.264/AVC" : origin.Contains("hev") ? "H.265/HEVC" : origin.Contains("dvh") || origin.Contains("hvc") ? "Dolby Vision" : ""; - //} - } } From 47fe32224415ca23bd661df927d8e179e85740ce Mon Sep 17 00:00:00 2001 From: croire <1432593898@qq.com> Date: Thu, 20 Oct 2022 22:34:21 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E5=BE=AE=E8=B0=83=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DownKyi.Core/BiliApi/BiliUtils/Constant.cs | 20 +++++++++---------- .../Services/Download/AddToDownloadService.cs | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/DownKyi.Core/BiliApi/BiliUtils/Constant.cs b/DownKyi.Core/BiliApi/BiliUtils/Constant.cs index c8a3fa2..72afb80 100644 --- a/DownKyi.Core/BiliApi/BiliUtils/Constant.cs +++ b/DownKyi.Core/BiliApi/BiliUtils/Constant.cs @@ -6,17 +6,17 @@ namespace DownKyi.Core.BiliApi.BiliUtils { private static readonly List resolutions = new List { - new Quality { Name = "超高清 8K", Id = 127 }, - new Quality { Name = "杜比视界", Id = 126 }, - new Quality { Name = "HDR 真彩", Id = 125 }, - new Quality { Name = "4K 超清", Id = 120 }, - new Quality { Name = "1080P 60帧", Id = 116 }, - new Quality { Name = "1080P 高码率", Id = 112 }, - new Quality { Name = "1080P 高清", Id = 80 }, - new Quality { Name = "720P 60帧", Id = 74 }, - new Quality { Name = "720P 高清", Id = 64 }, - new Quality { Name = "480P 清晰", Id = 32 }, new Quality { Name = "360P 流畅", Id = 16 }, + new Quality { Name = "480P 清晰", Id = 32 }, + new Quality { Name = "720P 高清", Id = 64 }, + new Quality { Name = "720P 60帧", Id = 74 }, + new Quality { Name = "1080P 高清", Id = 80 }, + new Quality { Name = "1080P 高码率", Id = 112 }, + new Quality { Name = "1080P 60帧", Id = 116 }, + new Quality { Name = "4K 超清", Id = 120 }, + new Quality { Name = "HDR 真彩", Id = 125 }, + new Quality { Name = "杜比视界", Id = 126 }, + new Quality { Name = "超高清 8K", Id = 127 }, }; private static readonly List codecIds = new List diff --git a/DownKyi/Services/Download/AddToDownloadService.cs b/DownKyi/Services/Download/AddToDownloadService.cs index 3783fc9..eddb62a 100644 --- a/DownKyi/Services/Download/AddToDownloadService.cs +++ b/DownKyi/Services/Download/AddToDownloadService.cs @@ -260,7 +260,7 @@ namespace DownKyi.Services.Download } if (isDownloading) { continue; } - // 如果存在下载完成列表,弹出选择框是否再次下载 + // TODO 如果存在下载完成列表,弹出选择框是否再次下载 bool isDownloaded = false; foreach (DownloadedItem item in App.DownloadedList) { From 1c2cffccda38e7e14cd11a4be221bd0eef691e5e Mon Sep 17 00:00:00 2001 From: croire <1432593898@qq.com> Date: Fri, 21 Oct 2022 23:34:35 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=BE=9D=E8=B5=96?= =?UTF-8?q?=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DownKyi.Core/DownKyi.Core.csproj | 8 ++++---- DownKyi.Core/packages.config | 4 ++-- DownKyi/Views/Settings/ViewAbout.xaml | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/DownKyi.Core/DownKyi.Core.csproj b/DownKyi.Core/DownKyi.Core.csproj index 6c0a7a7..e59b8bf 100644 --- a/DownKyi.Core/DownKyi.Core.csproj +++ b/DownKyi.Core/DownKyi.Core.csproj @@ -52,8 +52,8 @@ ..\packages\Brotli.NET.2.1.1\lib\net45\Brotli.Core.dll - - ..\packages\Google.Protobuf.3.21.7\lib\net45\Google.Protobuf.dll + + ..\packages\Google.Protobuf.3.21.8\lib\net45\Google.Protobuf.dll ..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll @@ -388,9 +388,9 @@ - + - + \ No newline at end of file diff --git a/DownKyi.Core/packages.config b/DownKyi.Core/packages.config index 1c30c53..c48d9de 100644 --- a/DownKyi.Core/packages.config +++ b/DownKyi.Core/packages.config @@ -1,8 +1,8 @@  - - + + diff --git a/DownKyi/Views/Settings/ViewAbout.xaml b/DownKyi/Views/Settings/ViewAbout.xaml index 6912849..49ab9a5 100644 --- a/DownKyi/Views/Settings/ViewAbout.xaml +++ b/DownKyi/Views/Settings/ViewAbout.xaml @@ -188,7 +188,7 @@ Grid.Column="2" FontSize="12" Foreground="{DynamicResource BrushTextDark}" - Text="3.20.1" /> + Text="3.21.8" />