修改音质描述【普通音质有3档质量,但不是固定的320K或192K,因此仅用高中低表述,以免产生误解】

pull/671/head
leiurayer 2 years ago
parent 8cd0f82e09
commit becb4e3e58

@ -28,9 +28,12 @@ namespace DownKyi.Core.BiliApi.BiliUtils
private static readonly List<Quality> qualities = new List<Quality> private static readonly List<Quality> qualities = new List<Quality>
{ {
new Quality { Name = "64K", Id = 30216 }, //new Quality { Name = "64K", Id = 30216 },
new Quality { Name = "132K", Id = 30232 }, //new Quality { Name = "132K", Id = 30232 },
new Quality { Name = "192K", Id = 30280 }, //new Quality { Name = "192K", Id = 30280 },
new Quality { Name = "低质量", Id = 30216 },
new Quality { Name = "中质量", Id = 30232 },
new Quality { Name = "高质量", Id = 30280 },
new Quality { Name = "Dolby Atmos", Id = 30250 }, new Quality { Name = "Dolby Atmos", Id = 30250 },
new Quality { Name = "Hi-Res无损", Id = 30251 }, new Quality { Name = "Hi-Res无损", Id = 30251 },
}; };

@ -98,6 +98,7 @@ namespace DownKyi.Services
private static ObservableCollection<string> GetAudioQualityFormatList(PlayUrl playUrl, int defaultAudioQuality) private static ObservableCollection<string> GetAudioQualityFormatList(PlayUrl playUrl, int defaultAudioQuality)
{ {
List<string> audioQualityFormatList = new List<string>(); List<string> audioQualityFormatList = new List<string>();
List<string> sortList = new List<string>();
List<Quality> audioQualities = Constant.GetAudioQualities(); List<Quality> audioQualities = Constant.GetAudioQualities();
if (playUrl.Dash.Audio != null && playUrl.Dash.Audio.Count > 0) if (playUrl.Dash.Audio != null && playUrl.Dash.Audio.Count > 0)
@ -131,10 +132,19 @@ namespace DownKyi.Services
} }
} }
audioQualityFormatList.Sort(new StringLogicalComparer<string>()); //audioQualityFormatList.Sort(new StringLogicalComparer<string>());
audioQualityFormatList.Reverse(); //audioQualityFormatList.Reverse();
return new ObservableCollection<string>(audioQualityFormatList); foreach (var item in audioQualities)
{
if (audioQualityFormatList.Contains(item.Name))
{
sortList.Add(item.Name);
}
}
sortList.Reverse();
return new ObservableCollection<string>(sortList);
} }
/// <summary> /// <summary>

Loading…
Cancel
Save