diff --git a/DownKyi.Core/FileName/FileName.cs b/DownKyi.Core/FileName/FileName.cs index 23d9c1d..4d7d97d 100644 --- a/DownKyi.Core/FileName/FileName.cs +++ b/DownKyi.Core/FileName/FileName.cs @@ -15,6 +15,10 @@ namespace DownKyi.Core.FileName private string videoQuality = "VIDEO_QUALITY"; private string videoCodec = "VIDEO_CODEC"; + private long avid = -1; + private string bvid = "BVID"; + private long cid = -1; + private FileName(List nameParts) { this.nameParts = nameParts; @@ -73,6 +77,24 @@ namespace DownKyi.Core.FileName 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 string RelativePath() { string path = string.Empty; @@ -112,6 +134,15 @@ namespace DownKyi.Core.FileName case FileNamePart.VIDEO_CODEC: path += videoCodec; break; + case FileNamePart.AVID: + path += avid; + break; + case FileNamePart.BVID: + path += bvid; + break; + case FileNamePart.CID: + path += cid; + break; } if (((int)part) >= 100) diff --git a/DownKyi.Core/FileName/FileNamePart.cs b/DownKyi.Core/FileName/FileNamePart.cs index 551829c..ca9e6a4 100644 --- a/DownKyi.Core/FileName/FileNamePart.cs +++ b/DownKyi.Core/FileName/FileNamePart.cs @@ -12,6 +12,10 @@ VIDEO_QUALITY, VIDEO_CODEC, + AVID, + BVID, + CID, + // 斜杠 SLASH = 100, diff --git a/DownKyi/Services/Download/AddToDownloadService.cs b/DownKyi/Services/Download/AddToDownloadService.cs index 939dcf6..b827aa0 100644 --- a/DownKyi/Services/Download/AddToDownloadService.cs +++ b/DownKyi/Services/Download/AddToDownloadService.cs @@ -294,7 +294,10 @@ 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" : "") + .SetAvid(page.Avid) + .SetBvid(page.Bvid) + .SetCid(page.Cid); string filePath = Path.Combine(directory, fileName.RelativePath()); // 视频类别 diff --git a/DownKyi/ViewModels/Settings/ViewVideoViewModel.cs b/DownKyi/ViewModels/Settings/ViewVideoViewModel.cs index a36ac6d..e401f02 100644 --- a/DownKyi/ViewModels/Settings/ViewVideoViewModel.cs +++ b/DownKyi/ViewModels/Settings/ViewVideoViewModel.cs @@ -469,6 +469,15 @@ namespace DownKyi.ViewModels.Settings case FileNamePart.VIDEO_CODEC: display = DictionaryResource.GetString("DisplayVideoCodec"); break; + case FileNamePart.AVID: + display = "avid"; + break; + case FileNamePart.BVID: + display = "bvid"; + break; + case FileNamePart.CID: + display = "cid"; + break; } if (((int)item) >= 100)