From 27f67ffab7851f74ec2a2f198d8bd21f7d6a9fb8 Mon Sep 17 00:00:00 2001 From: GD_ Slime <1289744583@qq.com> Date: Mon, 1 Jan 2024 20:55:37 +0800 Subject: [PATCH 01/20] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=B8=AF=E6=BE=B3?= =?UTF-8?q?=E5=8F=B0=E7=95=AA=E5=89=A7=E6=92=AD=E6=94=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/BiliLite.UWP/Models/Requests/Api/SeasonApi.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/BiliLite.UWP/Models/Requests/Api/SeasonApi.cs b/src/BiliLite.UWP/Models/Requests/Api/SeasonApi.cs index 247b6ed1..a73d0765 100644 --- a/src/BiliLite.UWP/Models/Requests/Api/SeasonApi.cs +++ b/src/BiliLite.UWP/Models/Requests/Api/SeasonApi.cs @@ -16,6 +16,7 @@ public ApiModel Detail(string season_id, bool proxy = false) baseUrl = $"{baseUrl}/pgc/view/v2/app/season", parameter = ApiHelper.MustParameter(AppKey, true) + $"&season_id={season_id}" }; + api.parameter = api.parameter.Replace("build=6235200", "build=75900200"); api.parameter += ApiHelper.GetSign(api.parameter, AppKey); return api; } From 56056dccb9176c5285fc0d06535aaad8414b6deb Mon Sep 17 00:00:00 2001 From: GD-Slime <82302542+GD-Slime@users.noreply.github.com> Date: Wed, 3 Jan 2024 20:25:51 +0800 Subject: [PATCH 02/20] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BA=86=E4=BB=8E?= =?UTF-8?q?=E9=9D=9E=E7=95=AA=E5=89=A7=E9=A1=B5=E6=89=93=E5=BC=80=E7=95=AA?= =?UTF-8?q?=E5=89=A7=E6=97=B6=E4=BA=A7=E7=94=9F=E7=9A=84=E9=94=99=E8=AF=AF?= =?UTF-8?q?=20(#472)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复了从非番剧页打开番剧时产生的错误 --- src/BiliLite.UWP/Extensions/BiliExtensions.cs | 27 ++++++++++++++----- src/BiliLite.UWP/Models/Common/Enumerates.cs | 6 +++++ .../Models/Requests/Api/SeasonApi.cs | 23 +++++++++++++--- 3 files changed, 47 insertions(+), 9 deletions(-) diff --git a/src/BiliLite.UWP/Extensions/BiliExtensions.cs b/src/BiliLite.UWP/Extensions/BiliExtensions.cs index 0ce3636b..5800ff2c 100644 --- a/src/BiliLite.UWP/Extensions/BiliExtensions.cs +++ b/src/BiliLite.UWP/Extensions/BiliExtensions.cs @@ -1,11 +1,13 @@ -using BiliLite.Models.Common; +using BiliLite.Models; +using BiliLite.Models.Common; +using BiliLite.Models.Common.Season; +using BiliLite.Models.Exceptions; using BiliLite.Models.Requests.Api; using BiliLite.Models.Responses; using BiliLite.Services; using Microsoft.Toolkit.Uwp.Helpers; using Microsoft.Toolkit.Uwp.UI.Controls; using Newtonsoft.Json; -using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; using System.Net.Http; @@ -29,12 +31,25 @@ public static async Task BangumiEpidToSid(string epid) { try { - var re = await $"https://bangumi.bilibili.com/view/web_api/season?ep_id={epid}".GetString(); - var obj = JObject.Parse(re); - return obj["result"]["season_id"].ToString(); + var results = await new SeasonApi().Detail(epid, SeasonIdType.EpId).Request(); + if (!results.status) + { + throw new CustomizedErrorException(results.message); + } + + //访问番剧详情 + var data = await results.GetJson>(); + + if (!data.success) + { + throw new CustomizedErrorException(data.message); + } + + return data.data.SeasonId.ToString(); } - catch (Exception) + catch (Exception ex) { + _logger.Error("转换epId到seasonId错误", ex); return ""; } } diff --git a/src/BiliLite.UWP/Models/Common/Enumerates.cs b/src/BiliLite.UWP/Models/Common/Enumerates.cs index 8fa093ce..9cd26662 100644 --- a/src/BiliLite.UWP/Models/Common/Enumerates.cs +++ b/src/BiliLite.UWP/Models/Common/Enumerates.cs @@ -401,4 +401,10 @@ public enum MessageType /// OnlineRankChange, } + + public enum SeasonIdType + { + SeasonId, + EpId, + } } \ No newline at end of file diff --git a/src/BiliLite.UWP/Models/Requests/Api/SeasonApi.cs b/src/BiliLite.UWP/Models/Requests/Api/SeasonApi.cs index a73d0765..15e9e370 100644 --- a/src/BiliLite.UWP/Models/Requests/Api/SeasonApi.cs +++ b/src/BiliLite.UWP/Models/Requests/Api/SeasonApi.cs @@ -1,12 +1,20 @@ using BiliLite.Services; using System; +using BiliLite.Models.Common; +using Bilibili.App.View.V1; namespace BiliLite.Models.Requests.Api { public class SeasonApi : BaseApi { - - public ApiModel Detail(string season_id, bool proxy = false) + /// + /// 用season_id / ep_id 取番剧信息 + /// + /// seasonId / epId + /// id类型 + /// + /// + public ApiModel Detail(string id, SeasonIdType type = SeasonIdType.SeasonId, bool proxy = false) { var baseUrl = ApiHelper.API_BASE_URL; @@ -14,8 +22,17 @@ public ApiModel Detail(string season_id, bool proxy = false) { method = RestSharp.Method.Get, baseUrl = $"{baseUrl}/pgc/view/v2/app/season", - parameter = ApiHelper.MustParameter(AppKey, true) + $"&season_id={season_id}" + parameter = ApiHelper.MustParameter(AppKey, true), }; + if (type == SeasonIdType.SeasonId) + { + api.parameter += $"&season_id={id}"; + } + else + { + api.parameter += $"&ep_id={id}"; + } + api.parameter = api.parameter.Replace("build=6235200", "build=75900200"); api.parameter += ApiHelper.GetSign(api.parameter, AppKey); return api; From 4b8c5bb8d159c26c31ad556f942147f0f0c1d1e2 Mon Sep 17 00:00:00 2001 From: ywmoyue Date: Thu, 4 Jan 2024 20:17:59 +0800 Subject: [PATCH 03/20] =?UTF-8?q?=E6=9B=B4=E6=96=B0NSDanmaku=E5=92=8CFFmpe?= =?UTF-8?q?gInteropX?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/BiliLite.UWP/BiliLite.UWP.csproj | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/BiliLite.UWP/BiliLite.UWP.csproj b/src/BiliLite.UWP/BiliLite.UWP.csproj index ed2dbce8..45b3e4a3 100644 --- a/src/BiliLite.UWP/BiliLite.UWP.csproj +++ b/src/BiliLite.UWP/BiliLite.UWP.csproj @@ -1161,7 +1161,7 @@ 1.0.2 - 1.0.0 + 1.0.1 5.0.0 @@ -1230,7 +1230,7 @@ 5.3.2 - 2.0.3 + 2.2.0 1.0.2 @@ -1288,4 +1288,4 @@ --> - + \ No newline at end of file From 9af175b69d5fc640c55883d55df5ed2c8248713c Mon Sep 17 00:00:00 2001 From: ywmoyue Date: Sat, 6 Jan 2024 12:10:53 +0800 Subject: [PATCH 04/20] =?UTF-8?q?FFmpegInteropX=E5=92=8CNSDanmaku=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E5=9B=9E=E9=80=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/BiliLite.UWP/BiliLite.UWP.csproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/BiliLite.UWP/BiliLite.UWP.csproj b/src/BiliLite.UWP/BiliLite.UWP.csproj index 45b3e4a3..0954eedd 100644 --- a/src/BiliLite.UWP/BiliLite.UWP.csproj +++ b/src/BiliLite.UWP/BiliLite.UWP.csproj @@ -1161,7 +1161,7 @@ 1.0.2 - 1.0.1 + 1.0.0 5.0.0 @@ -1230,7 +1230,7 @@ 5.3.2 - 2.2.0 + 2.0.3 1.0.2 From cd69c3f8e8363deedb4f85f5015ee4c39f590287 Mon Sep 17 00:00:00 2001 From: ywmoyue Date: Sat, 6 Jan 2024 12:11:22 +0800 Subject: [PATCH 05/20] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=9B=B4=E6=92=AD?= =?UTF-8?q?=E6=B6=88=E6=81=AFjson=E8=A7=A3=E6=9E=90=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/BiliLite.UWP/Modules/Live/LiveMessage.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/BiliLite.UWP/Modules/Live/LiveMessage.cs b/src/BiliLite.UWP/Modules/Live/LiveMessage.cs index 48329c8c..f9e04419 100644 --- a/src/BiliLite.UWP/Modules/Live/LiveMessage.cs +++ b/src/BiliLite.UWP/Modules/Live/LiveMessage.cs @@ -446,10 +446,15 @@ private void ParseMessage(string jsonMessage) } else if (cmd == "ONLINE_RANK_V2") { - if (obj["data"] != null) + if (obj["data"] != null && obj["data"]["list"] != null) { NewMessage?.Invoke(MessageType.OnlineRankChange, obj["data"]["list"].ToString()); } + + if (obj["data"] != null && obj["data"]["online_list"] != null) + { + NewMessage?.Invoke(MessageType.OnlineRankChange, obj["data"]["online_list"].ToString()); + } } } catch (Exception ex) From aba0968a33098759d7bb558371d8b39353e17113 Mon Sep 17 00:00:00 2001 From: GD-Slime <82302542+GD-Slime@users.noreply.github.com> Date: Sat, 6 Jan 2024 12:48:12 +0800 Subject: [PATCH 06/20] =?UTF-8?q?=E7=BE=8E=E5=8C=96=E5=BC=B9=E5=B9=95?= =?UTF-8?q?=E6=A0=8F=E4=B8=8E=E4=BC=98=E5=8C=96=E7=9B=B4=E6=92=AD=E6=92=AD?= =?UTF-8?q?=E6=94=BE=E4=BB=A5=E5=8F=8A=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=20(#462)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 修改并美化了弹幕栏 - 重新布局了弹幕栏 - 加入了用户的头像 - 点击头像可进入该用户个人空间 2. 修改了up个人主页的直播间按钮可见条件。现在为一直可见。(有时候想提前进直播间等主播开播) 2. 修复了醒目留言有按钮边框的问题 3. 修复了舰长图片有可能会奇怪的像素化的问题(包括互动栏与大航海列表) 4. 修复了一个潜在的无法获取相应直播流的问题 5. 修复了有新的舰长时,舰长数目不更新的问题 4. 加入了 `停止直播` 的直播信息流项目,然而目前未测试到相应结果 6. 加入了 `等级禁言` 的信息流项目 5. 尝试 fix #436 现在会根据本条弹幕的类型进行相应的延迟。(请进行更多测试是否还会造成延迟!) 7. 现在在`StartLive`类型的弹幕开始加载直播流时应该不会提示播放错误了。(基本证明可用,可进行更多测试) 8. 优化了无法加载直播流时的播放器行为。现在应该不会一直转圈显示加载了。 --- .../Extensions/StringExtensions.cs | 4 +- src/BiliLite.UWP/Models/Common/Enumerates.cs | 28 +++++ .../Models/Common/Live/DanmuMsgModel.cs | 45 ++++++- .../Models/Common/Live/GuardBuyMsgModel.cs | 33 ++++- .../Live/LiveMessageHandleActionsMap.cs | 114 ++++++++++++----- src/BiliLite.UWP/Modules/Live/LiveMessage.cs | 89 +++++++++---- src/BiliLite.UWP/Pages/LiveDetailPage.xaml | 118 ++++++++++++------ src/BiliLite.UWP/Pages/LiveDetailPage.xaml.cs | 17 +++ src/BiliLite.UWP/Pages/UserInfoPage.xaml | 8 +- .../Player/SubPlayers/LiveHlsPlayer.cs | 8 +- .../ViewModels/Live/LiveRoomViewModel.cs | 28 +++-- 11 files changed, 384 insertions(+), 108 deletions(-) diff --git a/src/BiliLite.UWP/Extensions/StringExtensions.cs b/src/BiliLite.UWP/Extensions/StringExtensions.cs index 93e7ee39..87a9bcab 100644 --- a/src/BiliLite.UWP/Extensions/StringExtensions.cs +++ b/src/BiliLite.UWP/Extensions/StringExtensions.cs @@ -80,7 +80,7 @@ public static string TraditionalToSimplified(this string input) /// /// /// - public static RichTextBlock ToRichTextBlock(this string txt, JObject emote, bool isLive = false, string color = null, string fontWeight = "Normal") + public static RichTextBlock ToRichTextBlock(this string txt, JObject emote, bool isLive = false, string fontColor = null, string fontWeight = "Normal") { var input = txt; try @@ -112,7 +112,7 @@ public static RichTextBlock ToRichTextBlock(this string txt, JObject emote, bool {0} ", input, isLive ? 22 : 20, - color == null ? "" : $"Foreground=\"{color}\"", + fontColor == null ? "" : $"Foreground=\"{fontColor}\"", $"FontWeight=\"{fontWeight}\""); var p = (RichTextBlock)XamlReader.Load(xaml); return p; diff --git a/src/BiliLite.UWP/Models/Common/Enumerates.cs b/src/BiliLite.UWP/Models/Common/Enumerates.cs index 9cd26662..5e61cd59 100644 --- a/src/BiliLite.UWP/Models/Common/Enumerates.cs +++ b/src/BiliLite.UWP/Models/Common/Enumerates.cs @@ -400,6 +400,34 @@ public enum MessageType /// 高能榜变动 /// OnlineRankChange, + + /// + /// 停止直播 + /// + StopLive, + + /// + /// 直播间等级禁言 + /// + RoomSlient, + } + + public enum MessageDelayType { + + /// + /// 常规弹幕消息 + /// + DanmuMessage, + + /// + /// 礼物消息 + /// + GiftMessage, + + /// + /// 其他系统消息 + /// + SystemMessage, } public enum SeasonIdType diff --git a/src/BiliLite.UWP/Models/Common/Live/DanmuMsgModel.cs b/src/BiliLite.UWP/Models/Common/Live/DanmuMsgModel.cs index fa4ac5fa..1e018fce 100644 --- a/src/BiliLite.UWP/Models/Common/Live/DanmuMsgModel.cs +++ b/src/BiliLite.UWP/Models/Common/Live/DanmuMsgModel.cs @@ -3,6 +3,8 @@ using BiliLite.ViewModels.Live; using Newtonsoft.Json.Linq; using Windows.UI.Xaml.Controls; +using Windows.UI; +using Windows.UI.Xaml.Media; namespace BiliLite.Models.Common.Live { @@ -38,6 +40,16 @@ public class DanmuMsgModel /// public string UserNameFontWeight { get; set; } = "Normal"; + /// + /// 用户uid + /// + public string Uid { get; set; } + + /// + /// 头像 + /// + public string Face { get; set; } + ///// ///// 等级 ///// @@ -90,9 +102,9 @@ public string UserCaptainImage { get => UserCaptain switch { - "舰长" => "/Assets/Live/ic_live_guard_3.png", - "提督" => "/Assets/Live/ic_live_guard_2.png", - "总督" => "/Assets/Live/ic_live_guard_1.png", + "舰长" => "ms-appx:///Assets/Live/ic_live_guard_3.png", + "提督" => "ms-appx:///Assets/Live/ic_live_guard_2.png", + "总督" => "ms-appx:///Assets/Live/ic_live_guard_1.png", _ => null, }; } @@ -114,6 +126,31 @@ public class BigStickerInfo public int Width { get; set; } } + /// + /// 弹幕富文本卡片背景颜色 + /// + public SolidColorBrush CardColor { get; set; } = new SolidColorBrush((Color)Application.Current.Resources["CardColor"]); + + /// + /// 弹幕富文本卡片Padding + /// + public Thickness CardPadding { get; set; } = new Thickness(10, 8, 10, 8); + + /// + /// 弹幕富文本卡片水平对齐方式 + /// + public HorizontalAlignment CardHorizontalAlignment { get; set; } = HorizontalAlignment.Left; + + /// + /// 是否显示用户头像 + /// + public Visibility ShowUserFace { get; set; } = Visibility.Visible; + + /// + /// 是否显示用户名 + /// + public Visibility ShowUserName { get; set; } = Visibility.Visible; + /// /// 是否显示富文本(用于用户发出大表情时) /// @@ -123,7 +160,7 @@ public class BigStickerInfo /// 是否显示大表情 /// - public Visibility ShowBigSticker => (ShowRichText == Visibility.Visible) ? Visibility.Collapsed : Visibility.Visible; + public Visibility ShowBigSticker { get; set; } = Visibility.Collapsed; /// /// 是否显示房管 diff --git a/src/BiliLite.UWP/Models/Common/Live/GuardBuyMsgModel.cs b/src/BiliLite.UWP/Models/Common/Live/GuardBuyMsgModel.cs index 6c0934bc..ff406c28 100644 --- a/src/BiliLite.UWP/Models/Common/Live/GuardBuyMsgModel.cs +++ b/src/BiliLite.UWP/Models/Common/Live/GuardBuyMsgModel.cs @@ -1,4 +1,7 @@ -namespace BiliLite.Models.Common.Live +using Windows.UI; +using Windows.UI.Xaml; + +namespace BiliLite.Models.Common.Live { public class GuardBuyMsgModel { @@ -17,6 +20,34 @@ public class GuardBuyMsgModel /// public int GuardLevel { get; set; } + /// + /// 字体颜色 + /// + public string FontColor + { + get => GuardLevel switch + { + 3 => "#FF23709E", + 2 => "#FF7B166F", + 1 => "#FFC01039", + _ => null + }; + } + + /// + /// 卡片颜色 + /// + public Color CardColor + { + get => GuardLevel switch + { + 3 => Color.FromArgb(255, 192, 216, 255), + 2 => Color.FromArgb(255, 250, 187, 255), + 1 => Color.FromArgb(255, 255, 185, 187), + _ => (Color)Application.Current.Resources["CardColor"], + }; + } + /// /// 数量 /// diff --git a/src/BiliLite.UWP/Models/Common/Live/LiveMessageHandleActionsMap.cs b/src/BiliLite.UWP/Models/Common/Live/LiveMessageHandleActionsMap.cs index b4d580f2..660db35c 100644 --- a/src/BiliLite.UWP/Models/Common/Live/LiveMessageHandleActionsMap.cs +++ b/src/BiliLite.UWP/Models/Common/Live/LiveMessageHandleActionsMap.cs @@ -6,6 +6,8 @@ using Newtonsoft.Json; using BiliLite.Extensions; using BiliLite.Services; +using Windows.UI; +using Windows.UI.Xaml.Media; namespace BiliLite.Models.Common.Live { @@ -31,9 +33,11 @@ public LiveMessageHandleActionsMap() { MessageType.WaringOrCutOff, WaringOrCutOff }, { MessageType.StartLive, StartLive }, { MessageType.WatchedChange, WatchedChange }, - { MessageType.RedPocketLotteryStart, RedPocketLotteryStart}, - { MessageType.RedPocketLotteryWinner, RedPocketLotteryWinner}, - { MessageType.OnlineRankChange, OnlineRankChange}, + { MessageType.RedPocketLotteryStart, RedPocketLotteryStart }, + { MessageType.RedPocketLotteryWinner, RedPocketLotteryWinner }, + { MessageType.OnlineRankChange, OnlineRankChange }, + { MessageType.StopLive, StopLive }, + { MessageType.RoomSlient, RoomSlient }, }; } @@ -51,7 +55,11 @@ private void ConnectSuccess(LiveRoomViewModel viewModel, object message) { viewModel.Messages.Add(new DanmuMsgModel() { - UserName = message.ToString(), + ShowUserFace = Visibility.Collapsed, + ShowUserName = Visibility.Collapsed, + CardPadding = new Thickness(6, 4, 6, 4), + RichText = ("直播间 " + viewModel.RoomID.ToString() + " " + message.ToString()).ToRichTextBlock(null, fontWeight: "Medium"), + CardHorizontalAlignment = HorizontalAlignment.Center, }); } @@ -98,9 +106,10 @@ private void InteractWord(LiveRoomViewModel viewModel, object message) if (!viewModel.ReceiveWelcomeMsg) return; var msg = new DanmuMsgModel() { - UserName = info.UserName, - // UserNameColor = "#FFFF69B4",//Colors.HotPink - RichText = info.MsgType == 1 ? "进入直播间".ToRichTextBlock(null, color: "Gray") : "关注了主播".ToRichTextBlock(null, color: "Gray") + ShowUserName = Visibility.Visible, + ShowUserFace = Visibility.Collapsed, + ShowRichText = Visibility.Collapsed, + UserName = info.UserName + " 进入直播间", }; if (info.ShowMedal == Visibility.Visible) @@ -172,22 +181,29 @@ private void GuardBuy(LiveRoomViewModel viewModel, object message) var info = message as GuardBuyMsgModel; var msg = new DanmuMsgModel { - UserName = info.UserName, - UserNameColor = "#FFFF69B4",//Colors.HotPink - RichText = $"成为了主播的{info.GiftName}🎉".ToRichTextBlock(null, fontWeight: "Medium"), - UserCaptain = info.GiftName, - ShowCaptain = Visibility.Visible, - UserNameFontWeight = "SemiBold", // 字重调大, 防止与进场弹幕混淆 + ShowUserName = Visibility.Collapsed, + ShowUserFace = Visibility.Collapsed, + RichText = (info.UserName + $" 成为了主播的{info.GiftName}🎉").ToRichTextBlock(null, fontWeight: "SemiBold", fontColor: info.FontColor), + CardColor = new SolidColorBrush(info.CardColor), + CardHorizontalAlignment = HorizontalAlignment.Center, }; - viewModel.Messages.Add(msg); // 刷新舰队列表 - _ = viewModel.GetGuardList(); + viewModel.ReloadGuardList().RunWithoutAwait(); } private void RoomChange(LiveRoomViewModel viewModel, object message) { var info = message as RoomChangeMsgModel; + var msg = new DanmuMsgModel + { + ShowUserFace = Visibility.Collapsed, + ShowUserName = Visibility.Collapsed, + RichText = ($"直播间标题已修改:\n{viewModel.RoomTitle} ➡️ {info.Title}").ToRichTextBlock(null, fontWeight: "SemiBold", fontColor: "#ff1e653a"), //一种绿色 + CardColor = new SolidColorBrush(Color.FromArgb(255, 228, 255, 233)), + CardHorizontalAlignment = HorizontalAlignment.Center, + }; + viewModel.Messages.Add(msg); viewModel.RoomTitle = info.Title; } @@ -196,9 +212,11 @@ private void RoomBlock(LiveRoomViewModel viewModel, object message) var info = message as RoomBlockMsgModel; var msg = new DanmuMsgModel() { - UserName = info.UserName, - RichText = "被直播间禁言🚫".ToRichTextBlock(null, fontWeight: "Medium"), // 字重调大, 防止与进场弹幕混淆) - UserNameFontWeight = "SemiBold", + ShowUserFace = Visibility.Collapsed, + ShowUserName = Visibility.Collapsed, + RichText = (info.UserName + " 被直播间禁言🚫").ToRichTextBlock(null, fontWeight: "SemiBold", fontColor: "White"), // 白色 + CardColor = new SolidColorBrush(Color.FromArgb(255, 235, 45, 80)), // 一种红色 + CardHorizontalAlignment = HorizontalAlignment.Center, }; viewModel.Messages.Add(msg); @@ -207,29 +225,40 @@ private void RoomBlock(LiveRoomViewModel viewModel, object message) private void WaringOrCutOff(LiveRoomViewModel viewModel, object message) { var info = message as WarningOrCutOffMsgModel; + var text = info.Command switch + { + "WARNING" => "⚠️直播间警告", + "CUT_OFF" => "⛔直播间切断", + _ => null, + }; + var cardColor = info.Command switch + { + "WARNING" => new SolidColorBrush(Color.FromArgb(255, 235, 156, 0)), // 一种橙黄色 + "CUT_OFF" => new SolidColorBrush(Color.FromArgb(255, 210, 20, 54)), // 一种深红色 + _ => null, + }; var msg = new DanmuMsgModel() { - UserName = info.Command switch - { - "WARNING" => "⚠️直播间警告", - "CUT_OFF" => "⛔直播间切断", - _ => null, - }, - UserNameColor = "FFFF0000", - RichText = info.Message.ToRichTextBlock(null, color: "Red", fontWeight: "Medium"), // 字重调大, 防止与进场弹幕混淆 - UserNameFontWeight = "SemiBold", + ShowUserFace = Visibility.Collapsed, + ShowUserName = Visibility.Collapsed, + RichText = (text + "\n" + info.Message).ToRichTextBlock(null, fontColor: "White", fontWeight: "SemiBold"), + CardColor = cardColor, + CardHorizontalAlignment = HorizontalAlignment.Center, }; viewModel.Messages.Add(msg); } - private async void StartLive(LiveRoomViewModel viewModel, object room_Id) + private void StartLive(LiveRoomViewModel viewModel, object room_Id) { - await System.Threading.Tasks.Task.Delay(TimeSpan.FromSeconds(5)); // 挂起五秒再获取, 否则很大可能一直卡加载而不缓冲 viewModel.GetPlayUrls(room_Id.ToInt32(), SettingService.GetValue(SettingConstants.Live.DEFAULT_QUALITY, 10000)).RunWithoutAwait(); viewModel.Messages.Add(new DanmuMsgModel() { - UserName = $"{room_Id} 直播间开始直播", + ShowUserFace = Visibility.Collapsed, + ShowUserName = Visibility.Collapsed, + RichText = $"直播间 {room_Id} 开始直播".ToRichTextBlock(null, fontWeight: "Medium"), + CardHorizontalAlignment = HorizontalAlignment.Center, + CardPadding = new Thickness(6, 4, 6, 4), }); } @@ -237,5 +266,30 @@ private void OnlineRankChange(LiveRoomViewModel viewModel, object message) { viewModel.Ranks.Where(rank => rank.RankType == "contribution-rank").ToList()?[0]?.ReloadData().RunWithoutAwait(); } + + private void StopLive(LiveRoomViewModel viewModel, object message) + { + //viewModel.GetPlayUrls(viewModel.RoomID.ToInt32(), SettingService.GetValue(SettingConstants.Live.DEFAULT_QUALITY, 10000)).RunWithoutAwait(); + viewModel.Messages.Add(new DanmuMsgModel() + { + ShowUserFace = Visibility.Collapsed, + ShowUserName = Visibility.Collapsed, + RichText = $"直播间 {viewModel.RoomID} 停止直播".ToRichTextBlock(null, fontWeight: "Medium"), + CardHorizontalAlignment = HorizontalAlignment.Center, + CardPadding = new Thickness(6, 4, 6, 4), + }); + } + + private void RoomSlient(LiveRoomViewModel viewModel, object level) + { + viewModel.Messages.Add(new DanmuMsgModel() + { + ShowUserFace = Visibility.Collapsed, + ShowUserName = Visibility.Collapsed, + RichText = ((int)level > 0 ? $"直播间开启了等级{level}禁言🤐" : "直播间关闭了等级禁言🗣️").ToRichTextBlock(null, fontWeight: "SemiBold", fontColor: "White"), + CardHorizontalAlignment = HorizontalAlignment.Center, + CardColor = new SolidColorBrush(Color.FromArgb(255, 235, 45, 80)), // 一种红色 + }); + } } } diff --git a/src/BiliLite.UWP/Modules/Live/LiveMessage.cs b/src/BiliLite.UWP/Modules/Live/LiveMessage.cs index f9e04419..96c50163 100644 --- a/src/BiliLite.UWP/Modules/Live/LiveMessage.cs +++ b/src/BiliLite.UWP/Modules/Live/LiveMessage.cs @@ -148,17 +148,30 @@ private async Task ParseData(byte[] data) //可能有多条数据,做个分割 var textLines = Regex.Split(text, "[\x00-\x1f]+").Where(x => x.Length > 2 && x[0] == '{').ToArray(); - var delay = textLines.Length > 30 ? 0.1 : 0.05; // 大概3秒来一波 - delay = textLines.Length > 60 ? 0.2 : delay; foreach (var item in textLines) { - ParseMessage(item); - await Task.Delay(TimeSpan.FromSeconds(delay)); + // 每波弹幕大约2.5秒, 使用2.3秒避免弹幕延迟 + var delay = ParseMessage(item) switch + { + MessageDelayType.DanmuMessage => 2.3 / textLines.Length, // 常规弹幕类型, 加延迟 + MessageDelayType.GiftMessage => 0.1 / textLines.Length, // 礼物消息类型, 加一点延迟 + MessageDelayType.SystemMessage => 0.0, // 其他系统消息类型, 无需加延迟 + _ => 0.0 + }; + + if (delay > 0.0) + { + await Task.Delay(TimeSpan.FromSeconds(delay)); + } + else + { + continue; + } } } } - private void ParseMessage(string jsonMessage) + private MessageDelayType ParseMessage(string jsonMessage) { try { @@ -169,6 +182,16 @@ private void ParseMessage(string jsonMessage) var msg = new DanmuMsgModel(); if (obj["info"] != null && obj["info"].ToArray().Length != 0) { + // 获取头像 + if (obj["info"][0][15]["user"] != null) + { + var user = obj["info"][0][15]["user"]; + var uid = user["uid"].ToString(); + var face = user["base"]["face"].ToString(); + msg.Uid = uid; + msg.Face = face; + } + // 弹幕内黄豆表情详情 if (obj["info"][0][15]["extra"] != null)// && obj["info"][0][15]["extra"].ToArray().Length != 0) { @@ -181,9 +204,8 @@ private void ParseMessage(string jsonMessage) // 弹幕内大表情详情 if (obj["info"][0][13] != null && obj["info"][0][13].ToArray().Length != 0) - { - // 如果有大表情, 直接不需要显示任何文字 - msg.ShowRichText = Visibility.Collapsed; + { + msg.ShowBigSticker = Visibility.Visible; msg.BigSticker = new DanmuMsgModel.BigStickerInfo { Url = (string)obj["info"][0][13]["url"], @@ -199,6 +221,7 @@ private void ParseMessage(string jsonMessage) msg.Text = obj["info"][1].ToString(); // 字重调大, 防止与进场弹幕混淆 msg.UserNameFontWeight = "SemiBold"; + // 将弹幕普通文本转为富文本 msg.RichText = msg.Text.ToRichTextBlock(msg.Emoji, true, fontWeight: "Medium"); // 弹幕颜色 @@ -211,7 +234,7 @@ private void ParseMessage(string jsonMessage) // 是否为房管 if (obj["info"][2] != null && obj["info"][2].ToArray().Length != 0) { - msg.UserName = obj["info"][2][1].ToString() + ":"; + msg.UserName = obj["info"][2][1].ToString(); if (obj["info"][2][2] != null && Convert.ToInt32(obj["info"][2][2].ToString()) == 1) { msg.Role = "房管"; @@ -264,7 +287,7 @@ private void ParseMessage(string jsonMessage) //} NewMessage?.Invoke(MessageType.Danmu, msg); - return; + return MessageDelayType.DanmuMessage; } } else if (cmd == "SEND_GIFT" || cmd == "POPULARITY_RED_POCKET_NEW") @@ -280,7 +303,7 @@ private void ParseMessage(string jsonMessage) msg.UserID = obj["data"]["uid"].ToString(); NewMessage?.Invoke(MessageType.Gift, msg); } - return; + return MessageDelayType.GiftMessage; } else if (cmd == "COMBO_SEND") { @@ -295,7 +318,7 @@ private void ParseMessage(string jsonMessage) msg.UserID = obj["data"]["uid"].ToString(); NewMessage?.Invoke(MessageType.Gift, msg); } - return; + return MessageDelayType.GiftMessage; } else if (cmd == "INTERACT_WORD") { @@ -316,7 +339,7 @@ private void ParseMessage(string jsonMessage) NewMessage?.Invoke(MessageType.InteractWord, w); } - return; + return MessageDelayType.SystemMessage; } // 没写相关实现, 先注释掉 //if (cmd == "SYS_MSG") @@ -330,7 +353,7 @@ private void ParseMessage(string jsonMessage) { NewMessage?.Invoke(MessageType.AnchorLotteryStart, obj["data"].ToString()); } - return; + return MessageDelayType.SystemMessage; } else if (cmd == "ANCHOR_LOT_AWARD") { @@ -338,7 +361,7 @@ private void ParseMessage(string jsonMessage) { NewMessage?.Invoke(MessageType.AnchorLotteryAward, obj["data"].ToString()); } - return; + return MessageDelayType.SystemMessage; } else if (cmd == "POPULARITY_RED_POCKET_START") { @@ -346,7 +369,7 @@ private void ParseMessage(string jsonMessage) { NewMessage?.Invoke(MessageType.RedPocketLotteryStart, obj["data"].ToString()); } - return; + return MessageDelayType.SystemMessage; } else if (cmd == "POPULARITY_RED_POCKET_WINNER_LIST") { @@ -354,12 +377,12 @@ private void ParseMessage(string jsonMessage) { NewMessage?.Invoke(MessageType.RedPocketLotteryWinner, obj["data"].ToString()); } - return; + return MessageDelayType.SystemMessage; } else if (cmd == "SUPER_CHAT_MESSAGE") { var msgView = new SuperChatMsgViewModel(); - if (obj["data"] == null) return; + if (obj["data"] == null) return MessageDelayType.SystemMessage; msgView.BackgroundBottomColor = obj["data"]["background_bottom_color"].ToString(); msgView.BackgroundColor = obj["data"]["background_color"].ToString(); msgView.BackgroundImage = obj["data"]["background_image"].ToString(); @@ -374,7 +397,7 @@ private void ParseMessage(string jsonMessage) msgView.Price = obj["data"]["price"].ToInt32(); msgView.Username = obj["data"]["user_info"]["uname"].ToString(); NewMessage?.Invoke(MessageType.SuperChat, msgView); - return; + return MessageDelayType.SystemMessage; } else if (cmd == "ROOM_CHANGE") { @@ -389,7 +412,7 @@ private void ParseMessage(string jsonMessage) ParentAreaID = obj["data"]["parent_area_id"].ToInt32(), }); } - return; + return MessageDelayType.SystemMessage; } else if (cmd == "GUARD_BUY") { @@ -406,7 +429,7 @@ private void ParseMessage(string jsonMessage) GuardLevel = obj["data"]["guard_level"].ToInt32(), }); } - return; + return MessageDelayType.SystemMessage; } else if (cmd == "ROOM_BLOCK_MSG") { @@ -418,6 +441,7 @@ private void ParseMessage(string jsonMessage) UserName = obj["data"]["uname"].ToString(), }); } + return MessageDelayType.SystemMessage; } else if (cmd == "WARNING" || cmd == "CUT_OFF") { @@ -429,6 +453,7 @@ private void ParseMessage(string jsonMessage) Command = cmd, }); } + return MessageDelayType.SystemMessage; } else if (cmd == "LIVE" || cmd == "REENTER_LIVE_ROOM") { @@ -436,6 +461,7 @@ private void ParseMessage(string jsonMessage) { NewMessage?.Invoke(MessageType.StartLive, obj["roomid"].ToString()); } + return MessageDelayType.SystemMessage; } else if (cmd == "WATCHED_CHANGE") { @@ -443,6 +469,7 @@ private void ParseMessage(string jsonMessage) { NewMessage?.Invoke(MessageType.WatchedChange, obj["data"]["text_large"].ToString()); } + return MessageDelayType.SystemMessage; } else if (cmd == "ONLINE_RANK_V2") { @@ -450,12 +477,29 @@ private void ParseMessage(string jsonMessage) { NewMessage?.Invoke(MessageType.OnlineRankChange, obj["data"]["list"].ToString()); } - if (obj["data"] != null && obj["data"]["online_list"] != null) { NewMessage?.Invoke(MessageType.OnlineRankChange, obj["data"]["online_list"].ToString()); } + return MessageDelayType.SystemMessage; + } + else if (cmd == "PREPARING") //直播准备中, 即已停止直播(并没有测试到实际信息...) + { + if (obj["data"] != null) + { + NewMessage?.Invoke(MessageType.StopLive, null); + } + return MessageDelayType.SystemMessage; + } + else if (cmd == "ROOM_SILENT_ON" || cmd == "ROOM_SILENT_OFF") + { + if (obj["data"] != null) + { + NewMessage?.Invoke(MessageType.RoomSlient, obj["data"]["level"].ToInt32()); + } + return MessageDelayType.SystemMessage; } + return MessageDelayType.SystemMessage; } catch (Exception ex) { @@ -463,6 +507,7 @@ private void ParseMessage(string jsonMessage) { logger.Log("直播解析JSON包出错", LogType.Error ,ex); } + return MessageDelayType.SystemMessage; } } diff --git a/src/BiliLite.UWP/Pages/LiveDetailPage.xaml b/src/BiliLite.UWP/Pages/LiveDetailPage.xaml index b36e9b84..b0de229d 100644 --- a/src/BiliLite.UWP/Pages/LiveDetailPage.xaml +++ b/src/BiliLite.UWP/Pages/LiveDetailPage.xaml @@ -285,15 +285,47 @@ - - - - - - - 房管 - - + + + + + + + + + + + + + + + + + + + + + + + 房管 + + + + + + + + + + + + + + + + + + @@ -307,32 +339,36 @@ - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1054,7 +1090,7 @@ - + + + - - + + + diff --git a/src/BiliLite.UWP/Player/SubPlayers/LiveHlsPlayer.cs b/src/BiliLite.UWP/Player/SubPlayers/LiveHlsPlayer.cs index 485f0ebe..b504d27c 100644 --- a/src/BiliLite.UWP/Player/SubPlayers/LiveHlsPlayer.cs +++ b/src/BiliLite.UWP/Player/SubPlayers/LiveHlsPlayer.cs @@ -7,6 +7,7 @@ using BiliLite.Models.Common.Player; using BiliLite.Player.SubPlayers; using BiliLite.Player.MediaInfos; +using System.Linq; namespace BiliLite.Player { @@ -29,7 +30,11 @@ public LiveHlsPlayer(PlayerConfig playerConfig, MediaPlayerElement playerElement m_config.FFmpegOptions.Add("rtsp_transport", "tcp"); m_config.FFmpegOptions.Add("user_agent", "Mozilla/5.0 BiliDroid/1.12.0 (bbcallen@gmail.com)"); m_config.FFmpegOptions.Add("referer", "https://live.bilibili.com/"); - } + + m_config.FFmpegOptions.Add("reconnect_streamed", 1); + m_config.FFmpegOptions.Add("reconnect_on_http_error", "404"); //刚开播时会404, 但一会就好了 + m_config.FFmpegOptions.Add("reconnect_delay_max", 10); + } public override double Volume { @@ -157,6 +162,7 @@ public override async Task Load() { url = (urls.FlvUrls != null && selectRouteLine < urls.FlvUrls.Count) ? urls.FlvUrls[selectRouteLine].Url : urls.HlsUrls[selectRouteLine].Url; } + url ??= urls.FlvUrls.FirstOrDefault(x => x.Url != null).Url; // 不论如何是有flv流的 m_url = url; diff --git a/src/BiliLite.UWP/ViewModels/Live/LiveRoomViewModel.cs b/src/BiliLite.UWP/ViewModels/Live/LiveRoomViewModel.cs index 63c28ed4..45d68b38 100644 --- a/src/BiliLite.UWP/ViewModels/Live/LiveRoomViewModel.cs +++ b/src/BiliLite.UWP/ViewModels/Live/LiveRoomViewModel.cs @@ -130,6 +130,11 @@ public LiveRoomViewModel() /// public string WatchedNum { get; set; } + /// + /// 舰长数 + /// + public int GuardNum { get; set; } + public bool Loading { get; set; } = true; public bool Attention { get; set; } @@ -550,16 +555,14 @@ public async Task LoadLiveRoomDetail(string id) RoomID = data.data.RoomInfo.RoomId; RoomTitle = data.data.RoomInfo.Title; - //WatchedNum = data.data.RoomInfo.Online; Liveing = data.data.RoomInfo.LiveStatus == 1; + GuardNum = data.data.GuardInfo.Count; LiveInfo = data.data; + if (Ranks == null) { Ranks = new List() { - //new LiveRoomRankViewModel(RoomID, data.data.RoomInfo.Uid, "金瓜子榜", "gold-rank"), - //new LiveRoomRankViewModel(RoomID, data.data.RoomInfo.Uid, "今日礼物榜", "today-rank"), - //new LiveRoomRankViewModel(RoomID, data.data.RoomInfo.Uid, "七日礼物榜", "seven-rank"), new LiveRoomRankViewModel(RoomID, data.data.RoomInfo.Uid, "高能用户贡献榜", "contribution-rank"), new LiveRoomRankViewModel(RoomID, data.data.RoomInfo.Uid, "粉丝榜", "fans"), }; @@ -870,10 +873,10 @@ public async Task GetGuardList() var data = await result.GetData(); if (!data.success) return; var guardNum = data.data["info"]["num"].ToInt32(); - LiveInfo.GuardInfo.Count = guardNum; // 更新显示数字(似乎不生效...) + GuardNum = guardNum; // 更新显示数字 var top3 = JsonConvert.DeserializeObject>(data.data["top3"].ToString()); - if (Guards.Count == 0 && top3 != null && top3.Count != 0 && Guards.Count < guardNum) + if (Guards.Count == 0 && top3 != null && top3.Count != 0 && Guards.Count < GuardNum) { foreach (var item in top3) { @@ -882,7 +885,7 @@ public async Task GetGuardList() } var list = JsonConvert.DeserializeObject>(data.data["list"].ToString()); - if (list != null && list.Count != 0 && Guards.Count < guardNum) + if (list != null && list.Count != 0 && Guards.Count < GuardNum) { foreach (var item in list) { @@ -923,6 +926,17 @@ public async void LoadMoreGuardList() await GetGuardList(); } + /// + /// 重新加载舰队信息 + /// + public async Task ReloadGuardList() + { + if (LoadingGuard) { return; } + Guards?.Clear(); + GuardPage = 1; + await GetGuardList(); + } + public async Task GetFreeSilverTime() { try From 9115e5f8d78d0bffcb4c1223ce7f473baa153566 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BF=8E=E9=A3=8E?= <31241581+JimHans@users.noreply.github.com> Date: Sat, 6 Jan 2024 13:02:24 +0800 Subject: [PATCH 07/20] =?UTF-8?q?=E7=94=BB=E9=9D=A2=E5=B0=BA=E5=AF=B8?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=85=BC=E5=AE=B9=E6=A8=A1=E5=BC=8F=EF=BC=8C?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=83=A8=E5=88=86=E8=AE=BE=E5=A4=87=E7=BC=A9?= =?UTF-8?q?=E6=94=BE=E7=94=BB=E9=9D=A2=E9=BB=91=E5=B1=8F=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98=20(#475)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/BiliLite.UWP/Controls/Player.xaml.cs | 25 +++++++++++++++++++ src/BiliLite.UWP/Controls/PlayerControl.xaml | 1 + .../Controls/PlayerControl.xaml.cs | 2 ++ src/BiliLite.UWP/Player/IBiliPlayer.cs | 4 +++ 4 files changed, 32 insertions(+) diff --git a/src/BiliLite.UWP/Controls/Player.xaml.cs b/src/BiliLite.UWP/Controls/Player.xaml.cs index 2ce9783e..c9248775 100644 --- a/src/BiliLite.UWP/Controls/Player.xaml.cs +++ b/src/BiliLite.UWP/Controls/Player.xaml.cs @@ -1086,6 +1086,30 @@ public void SetRatioMode(int mode) mediaPlayerVideo.Height = this.ActualHeight; mediaPlayerVideo.Width = this.ActualHeight * 4 / 3; break; + case 4: + if (m_dashInfo != null) + { + if (((double)this.ActualWidth / (double)this.ActualHeight) <= ((double)m_dashInfo.Video.Width / (double)m_dashInfo.Video.Height)) + { + /// 原视频长宽比大于等于窗口长宽比 + mediaPlayerVideo.Stretch = Stretch.Fill; + mediaPlayerVideo.Width = this.ActualWidth; + mediaPlayerVideo.Height = this.ActualWidth * (double)m_dashInfo.Video.Height / (double)m_dashInfo.Video.Width; + } + else { + /// 原视频长宽比小于窗口长宽比 + mediaPlayerVideo.Stretch = Stretch.Fill; + mediaPlayerVideo.Width = this.ActualHeight * (double)m_dashInfo.Video.Width / (double)m_dashInfo.Video.Height; + mediaPlayerVideo.Height = this.ActualHeight; + } + } + else { + /// 未获取到DASH视频信息则不缩放 + mediaPlayerVideo.Stretch = Stretch.None; + mediaPlayerVideo.Width = double.NaN; + mediaPlayerVideo.Height = double.NaN; + } + break; default: break; } @@ -1308,6 +1332,7 @@ public string GetMediaInfo() if (m_dashInfo != null && m_dashInfo.Audio != null) { info += $"Resolution: {m_dashInfo.Video.Width} x {m_dashInfo.Video.Height}\r\n"; + info += $"View Resolution: {(int)mediaPlayerVideo.Width} x {(int)mediaPlayerVideo.Height}\r\n"; info += $"Video Codec: {m_dashInfo.Video.Codecs}\r\n"; info += $"Video DataRate: {(m_dashInfo.Video.BandWidth / 1024).ToString("0.0")}Kbps\r\n"; info += $"Average Frame: {m_dashInfo.Video.FrameRate}\r\n"; diff --git a/src/BiliLite.UWP/Controls/PlayerControl.xaml b/src/BiliLite.UWP/Controls/PlayerControl.xaml index be2e2ca1..741b6ce1 100644 --- a/src/BiliLite.UWP/Controls/PlayerControl.xaml +++ b/src/BiliLite.UWP/Controls/PlayerControl.xaml @@ -494,6 +494,7 @@ 填充 16:9 4:3 + 兼容 diff --git a/src/BiliLite.UWP/Controls/PlayerControl.xaml.cs b/src/BiliLite.UWP/Controls/PlayerControl.xaml.cs index 7bd77e14..13dc8920 100644 --- a/src/BiliLite.UWP/Controls/PlayerControl.xaml.cs +++ b/src/BiliLite.UWP/Controls/PlayerControl.xaml.cs @@ -2329,6 +2329,8 @@ private void Player_PlayStateChanged(object sender, PlayState e) BottomBtnLoading.Visibility = Visibility.Visible; BottomBtnPlay.Visibility = Visibility.Collapsed; BottomBtnPause.Visibility = Visibility.Collapsed; + // 更新画面比例 + Player.SetRatioMode(PlayerSettingRatio.SelectedIndex); break; case PlayState.Playing: KeepScreenOn(true); diff --git a/src/BiliLite.UWP/Player/IBiliPlayer.cs b/src/BiliLite.UWP/Player/IBiliPlayer.cs index 1dd620a2..4e65963d 100644 --- a/src/BiliLite.UWP/Player/IBiliPlayer.cs +++ b/src/BiliLite.UWP/Player/IBiliPlayer.cs @@ -24,6 +24,10 @@ public enum PlayerAspectRatio /// 保持4:3 /// S4_3, + /// + /// 兼容 + /// + Compatible } public enum PlayerState { From c04f6c703ac976324b19f83587bb73c870b8aa68 Mon Sep 17 00:00:00 2001 From: GD-Slime <82302542+GD-Slime@users.noreply.github.com> Date: Sat, 20 Jan 2024 09:41:34 +0800 Subject: [PATCH 08/20] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=94=B6=E8=97=8F?= =?UTF-8?q?=E5=A4=B9=E7=A7=81=E5=AF=86=E9=97=AE=E9=A2=98=20(#481)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/BiliLite.UWP/Models/Requests/Api/User/FavoriteAPI.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/BiliLite.UWP/Models/Requests/Api/User/FavoriteAPI.cs b/src/BiliLite.UWP/Models/Requests/Api/User/FavoriteAPI.cs index 621fd4b3..363047b4 100644 --- a/src/BiliLite.UWP/Models/Requests/Api/User/FavoriteAPI.cs +++ b/src/BiliLite.UWP/Models/Requests/Api/User/FavoriteAPI.cs @@ -117,7 +117,7 @@ public ApiModel CreateFavorite(string title, string intro, bool isOpen) { method = RestSharp.Method.Post, baseUrl = $"{ApiHelper.API_BASE_URL}/x/v3/fav/folder/add", - body = ApiHelper.MustParameter(AppKey, true) + $"privacy={(isOpen ? 0 : 1)}&title={Uri.EscapeDataString(title)}&intro={Uri.EscapeDataString(intro)}" + body = ApiHelper.MustParameter(AppKey, true) + $"&privacy={(isOpen ? 0 : 1)}&title={Uri.EscapeDataString(title)}&intro={Uri.EscapeDataString(intro)}" }; api.body += ApiHelper.GetSign(api.body, AppKey); return api; @@ -136,7 +136,7 @@ public ApiModel EditFavorite(string title, string intro, bool isOpen, string med { method = RestSharp.Method.Post, baseUrl = $"{ApiHelper.API_BASE_URL}/x/v3/fav/folder/edit", - body = ApiHelper.MustParameter(AppKey, true) + $"privacy={(isOpen ? 0 : 1)}&title={Uri.EscapeDataString(title)}&intro={Uri.EscapeDataString(intro)}&media_id={media_id}" + body = ApiHelper.MustParameter(AppKey, true) + $"&privacy={(isOpen ? 0 : 1)}&title={Uri.EscapeDataString(title)}&intro={Uri.EscapeDataString(intro)}&media_id={media_id}" }; api.body += ApiHelper.GetSign(api.body, AppKey); return api; From 551213fb448e8d794430ed733e2676e35fb4d018 Mon Sep 17 00:00:00 2001 From: GD-Slime <82302542+GD-Slime@users.noreply.github.com> Date: Sat, 20 Jan 2024 10:11:04 +0800 Subject: [PATCH 09/20] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=83=AD=E9=97=A8?= =?UTF-8?q?=E9=A1=B5=E9=94=99=E8=AF=AF=EF=BC=8C=E8=B0=83=E6=95=B4=E5=85=83?= =?UTF-8?q?=E7=B4=A0=E5=B8=83=E5=B1=80=20(#480)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * update item width * 修复热门页故障 --- .../Models/Requests/Api/Home/HotApi.cs | 1 + src/BiliLite.UWP/Pages/Home/HotPage.xaml | 22 ++++++++++++------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/src/BiliLite.UWP/Models/Requests/Api/Home/HotApi.cs b/src/BiliLite.UWP/Models/Requests/Api/Home/HotApi.cs index 6a3b46b3..ca62e3ec 100644 --- a/src/BiliLite.UWP/Models/Requests/Api/Home/HotApi.cs +++ b/src/BiliLite.UWP/Models/Requests/Api/Home/HotApi.cs @@ -12,6 +12,7 @@ public ApiModel Popular(string idx = "0", string last_param = "") baseUrl = $"https://app.bilibili.com/x/v2/show/popular/index", parameter = ApiHelper.MustParameter(AppKey, true) + $"&idx={idx}&last_param={last_param}" }; + api.parameter = api.parameter.Replace("mobi_app=iphone", "mobi_app=android"); api.parameter += ApiHelper.GetSign(api.parameter, AppKey); return api; } diff --git a/src/BiliLite.UWP/Pages/Home/HotPage.xaml b/src/BiliLite.UWP/Pages/Home/HotPage.xaml index 0b081c00..acf449fd 100644 --- a/src/BiliLite.UWP/Pages/Home/HotPage.xaml +++ b/src/BiliLite.UWP/Pages/Home/HotPage.xaml @@ -44,10 +44,10 @@ - + - + @@ -55,14 +55,20 @@ - - - + + + + + + + + + - - - + + + From acb2ab8053abb500439a50e591a5657f3afadb3b Mon Sep 17 00:00:00 2001 From: ywmoyue Date: Sat, 20 Jan 2024 10:49:00 +0800 Subject: [PATCH 10/20] =?UTF-8?q?=E6=9B=B4=E6=96=B0contributors=E5=9B=BE?= =?UTF-8?q?=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- document/_img/contributors.png | Bin 13125 -> 17323 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/document/_img/contributors.png b/document/_img/contributors.png index 82d637eed838be143e9a6c90324cf6db4fd04143..839b886b84f27b97b362f0cad63a21870fc134ef 100644 GIT binary patch literal 17323 zcmZ_0RZv|`v@MJ~!QCB#yL$*uu)xOMg9UfpxVyW%I|O$pY~0=5?Q;I}<*&LAcRsAO zs#ZUA&F(RK%-N$mR8c_^837*w3=9leTI!oJ7#O7X=QkT1%;!_;X4&EM1?3zF@wIAj@=ByR_KR8Z zIR~y&aPvcJ3lEJ>btt|YT>$f>;-eCPh1Rys;~5U#KI3c91@zxMQnMAN6WPq(2USu@0{ESRt1?$7$UHZ}rME z{u^Z-+^BWeiY|6K?fmUO^IZFtJfJw=AOV`9zA~~m>?MUj3H)9LW+c{ANa%+OVFV3= z0((UF6o5flW9?r6g~iL)=7%I*gb`u<_%ncDRU<~h0$>2)_HuSWbHE|vLSe&+K)E7B z$k!c+bDyC)FFtdhJ#Ux2buJCh=q=KWf1&7VQZu#=lk$}K-yXc`?b0*)CjHPfXRj42 zkoRSg!rB!;MK?m?B3Pc`&!#7~$qEW1X3WdR_X)uNMqIa(wqImG6 zaE3z0s1VZ!iUO9dFw_kL^gFGIUi1U3xeo5)BwjxMGh_%4IiG<7T*+H?CUM}aL;lx3 zWIaoPQ@1pFHH86R#0dhZk!M9ULQ(ODLR~^=OCi`=0N^1kud?{z(xL*y#AeGRX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CrmULboLs6sPiDp*h(&1PhY$(V-H<*3|m8SX3R})LDKnKzp{^CDe yEq>qy%Rok1@|phMGavs17yr-Pxi Date: Sat, 27 Jan 2024 11:40:56 +0800 Subject: [PATCH 11/20] =?UTF-8?q?=E6=94=AF=E6=8C=81=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E8=AF=B7=E6=B1=82=E6=97=B6=E4=BD=BF=E7=94=A8=E7=9A=84build?= =?UTF-8?q?=E5=80=BC=EF=BC=9B=E6=9B=B4=E6=96=B0=E9=BB=98=E8=AE=A4=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E7=9A=84build=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Models/Common/SettingConstants.cs | 13 ++++++++++ src/BiliLite.UWP/Pages/SettingPage.xaml | 8 ++++++- src/BiliLite.UWP/Pages/SettingPage.xaml.cs | 24 +++++++++++++++++++ src/BiliLite.UWP/Services/ApiHelper.cs | 4 +++- 4 files changed, 47 insertions(+), 2 deletions(-) diff --git a/src/BiliLite.UWP/Models/Common/SettingConstants.cs b/src/BiliLite.UWP/Models/Common/SettingConstants.cs index 236d4156..64812d2e 100644 --- a/src/BiliLite.UWP/Models/Common/SettingConstants.cs +++ b/src/BiliLite.UWP/Models/Common/SettingConstants.cs @@ -581,6 +581,9 @@ public class Download } + /// + /// 开发者选项 + /// public class Other { /// @@ -622,6 +625,16 @@ public class Other /// 更新json请求地址 /// public const string UPDATE_JSON_ADDRESS = "RawRepositoryAddress"; + + /// + /// 发起请求时使用的build值 + /// + public const string REQUEST_BUILD = "RequestBuild"; + + /// + /// 默认发起请求时使用的build值 + /// + public const string DEFAULT_REQUEST_BUILD = "75900200"; } } } diff --git a/src/BiliLite.UWP/Pages/SettingPage.xaml b/src/BiliLite.UWP/Pages/SettingPage.xaml index 0434fda8..6fb8b8aa 100644 --- a/src/BiliLite.UWP/Pages/SettingPage.xaml +++ b/src/BiliLite.UWP/Pages/SettingPage.xaml @@ -561,7 +561,7 @@ - 其他 + 开发者选项 @@ -584,6 +584,12 @@ 优先使用Grpc请求动态 + 发起请求时使用的build值 + + + + + BiliLite-WebApi(用于处理UWP无法完成的事项) diff --git a/src/BiliLite.UWP/Pages/SettingPage.xaml.cs b/src/BiliLite.UWP/Pages/SettingPage.xaml.cs index f12d1cf0..ffe00250 100644 --- a/src/BiliLite.UWP/Pages/SettingPage.xaml.cs +++ b/src/BiliLite.UWP/Pages/SettingPage.xaml.cs @@ -760,6 +760,9 @@ private void LoadOther() SettingService.SetValue(SettingConstants.Other.FIRST_GRPC_REQUEST_DYNAMIC, swFirstGrpcRequestDynamic.IsOn); }); + RequestBuildTextBox.Text = SettingService.GetValue(SettingConstants.Other.REQUEST_BUILD, + SettingConstants.Other.DEFAULT_REQUEST_BUILD); + // BiliLiteWebApi BiliLiteWebApiTextBox.Text = SettingService.GetValue(SettingConstants.Other.BILI_LITE_WEB_API_BASE_URL, ApiConstants.BILI_LITE_WEB_API_DEFAULT_BASE_URL); BiliLiteWebApiTextBox.Loaded += (sender, e) => @@ -1021,5 +1024,26 @@ private void mirrorComboboxSelectAction(object selectedValue) } } } + + private void RequestBuildSaveBtn_OnClick(object sender, RoutedEventArgs e) + { + var build = RequestBuildTextBox.Text; + if (string.IsNullOrWhiteSpace(build)) + { + Notify.ShowMessageToast("请输入正确的build值"); + return; + } + + SettingService.SetValue(SettingConstants.Other.REQUEST_BUILD, build); + Notify.ShowMessageToast("已保存"); + } + + private void RequestBuildDefaultBtn_OnClick(object sender, RoutedEventArgs e) + { + var build = SettingConstants.Other.DEFAULT_REQUEST_BUILD; + SettingService.SetValue(SettingConstants.Other.REQUEST_BUILD, build); + RequestBuildTextBox.Text = build; + Notify.ShowMessageToast("已恢复默认"); + } } } diff --git a/src/BiliLite.UWP/Services/ApiHelper.cs b/src/BiliLite.UWP/Services/ApiHelper.cs index df071583..3718449d 100644 --- a/src/BiliLite.UWP/Services/ApiHelper.cs +++ b/src/BiliLite.UWP/Services/ApiHelper.cs @@ -49,7 +49,6 @@ public static class ApiHelper public static ApiKeyInfo AndroidKey = new ApiKeyInfo(Constants.ANDROID_APP_KEY, "560c52ccd288fed045859ed18bffd973", Constants.ANDROID_MOBI_APP, Constants.ANDROID_USER_AGENT); - private const string build = "6235200"; private const string _platform = "android"; public static string deviceId = ""; private static int[] mixinKeyEncTab = new int[] { @@ -134,6 +133,9 @@ public static string MustParameter(ApiKeyInfo apikey, bool needAccesskey = false { url = $"access_key={SettingService.Account.AccessKey}&"; } + + var build = SettingService.GetValue(SettingConstants.Other.REQUEST_BUILD, + SettingConstants.Other.DEFAULT_REQUEST_BUILD); return url + $"appkey={apikey.Appkey}&build={build}&mobi_app={apikey.MobiApp}&platform={_platform}&ts={TimeExtensions.GetTimestampS()}"; } From 5cff9f598f3643455b6861a7d52f82ff5912b23d Mon Sep 17 00:00:00 2001 From: GD-Slime <82302542+GD-Slime@users.noreply.github.com> Date: Sun, 4 Feb 2024 12:06:56 +0800 Subject: [PATCH 12/20] =?UTF-8?q?=E7=9B=B4=E6=92=AD=E9=97=B4=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=BC=80=E5=85=B3=E5=BA=95=E9=83=A8=E7=A4=BC=E7=89=A9?= =?UTF-8?q?=E6=A0=8F=E7=9A=84=E6=8C=89=E9=92=AE=20(#488)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 直播间添加开关底部礼物栏的按钮 --- src/BiliLite.UWP/Pages/LiveDetailPage.xaml | 14 +++++++++----- src/BiliLite.UWP/Pages/LiveDetailPage.xaml.cs | 5 +++++ .../ViewModels/Live/LiveDetailPageViewModel.cs | 2 ++ 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/src/BiliLite.UWP/Pages/LiveDetailPage.xaml b/src/BiliLite.UWP/Pages/LiveDetailPage.xaml index b0de229d..ab49f2b7 100644 --- a/src/BiliLite.UWP/Pages/LiveDetailPage.xaml +++ b/src/BiliLite.UWP/Pages/LiveDetailPage.xaml @@ -571,13 +571,13 @@ - - - - + @@ -130,7 +138,7 @@ - 下载完成() + 下载完成() @@ -206,7 +214,7 @@ StretchContentForSingleRow="false" DesiredWidth="460" SelectionMode="None" - ItemsSource="{x:Bind Path=m_viewModel.Downloadeds,Mode=OneWay}" + ItemsSource="{x:Bind Path=m_viewModel.DownloadedViewModels,Mode=OneWay}" IsItemClickEnabled="True"> - + @@ -134,7 +135,7 @@ - + diff --git a/src/BiliLite.UWP/Pages/SettingPage.xaml.cs b/src/BiliLite.UWP/Pages/SettingPage.xaml.cs index 9603448a..554decdc 100644 --- a/src/BiliLite.UWP/Pages/SettingPage.xaml.cs +++ b/src/BiliLite.UWP/Pages/SettingPage.xaml.cs @@ -6,7 +6,6 @@ using Microsoft.Toolkit.Uwp.UI; using Microsoft.UI.Xaml.Controls; using System; -using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using Windows.Foundation; @@ -17,6 +16,7 @@ using Windows.UI.Xaml.Controls; using Windows.UI.Xaml.Media; using Windows.UI.Xaml.Navigation; +using BiliLite.Models.Common.Home; using BiliLite.ViewModels.Download; using Microsoft.Extensions.DependencyInjection; @@ -272,11 +272,9 @@ private void LoadUI() }); }); - gridHomeCustom.ItemsSource = SettingService.GetValue>(SettingConstants.UI.HOEM_ORDER, HomeVM.GetAllNavItems()); + var navItems = SettingService.GetValue(SettingConstants.UI.HOEM_ORDER, DefaultHomeNavItems.GetDefaultHomeNavItems()); + gridHomeCustom.ItemsSource = new ObservableCollection(navItems); ExceptHomeNavItems(); - - - } private void LoadPlayer() { @@ -810,28 +808,41 @@ private void LoadOther() private void ExceptHomeNavItems() { - List list = new List(); - var all = HomeVM.GetAllNavItems(); - foreach (var item in all) + var defaultNavItems = DefaultHomeNavItems.GetDefaultHomeNavItems(); + var hideNavItems = DefaultHomeNavItems.GetDefaultHideHomeNavItems(); + var customNavItem = gridHomeCustom.ItemsSource as ObservableCollection; + + var customDontHideNavItems = hideNavItems.Where(hideNavItem => + customNavItem.Any(x => x.Title == hideNavItem.Title)).ToList(); + + foreach (var customDontHideNavItem in customDontHideNavItems) { - if ((gridHomeCustom.ItemsSource as ObservableCollection).FirstOrDefault(x => x.Title == item.Title) == null) + hideNavItems.Remove(customDontHideNavItem); + } + + foreach (var navItem in defaultNavItems) + { + if (!customNavItem.Any(x => x.Title == navItem.Title)) { - list.Add(item); + hideNavItems.Add(navItem); } } - gridHomeNavItem.ItemsSource = list; + + gridHomeNavItem.ItemsSource = hideNavItems; } private void gridHomeCustom_DragItemsCompleted(ListViewBase sender, DragItemsCompletedEventArgs args) { - SettingService.SetValue(SettingConstants.UI.HOEM_ORDER, gridHomeCustom.ItemsSource as ObservableCollection); + if (!(gridHomeCustom.ItemsSource is ObservableCollection navItems)) return; + SettingService.SetValue(SettingConstants.UI.HOEM_ORDER, navItems.ToList()); Notify.ShowMessageToast("更改成功,重启生效"); } private void gridHomeNavItem_ItemClick(object sender, ItemClickEventArgs e) { var item = e.ClickedItem as HomeNavItem; - (gridHomeCustom.ItemsSource as ObservableCollection).Add(item); - SettingService.SetValue(SettingConstants.UI.HOEM_ORDER, gridHomeCustom.ItemsSource as ObservableCollection); + if (!(gridHomeCustom.ItemsSource is ObservableCollection navItems)) return; + navItems.Add(item); + SettingService.SetValue(SettingConstants.UI.HOEM_ORDER, navItems.ToList()); ExceptHomeNavItems(); Notify.ShowMessageToast("更改成功,重启生效"); } diff --git a/src/BiliLite.UWP/ViewModels/Home/HomeNavItemViewModel.cs b/src/BiliLite.UWP/ViewModels/Home/HomeNavItemViewModel.cs new file mode 100644 index 00000000..f9a71193 --- /dev/null +++ b/src/BiliLite.UWP/ViewModels/Home/HomeNavItemViewModel.cs @@ -0,0 +1,27 @@ +using System; +using BiliLite.ViewModels.Common; +using FontAwesome5; +using PropertyChanged; + +namespace BiliLite.ViewModels.Home +{ + public class HomeNavItemViewModel : BaseViewModel + { + [DoNotNotify] + public string Title { get; set; } + + [DoNotNotify] + public EFontAwesomeIcon Icon { get; set; } + + [DoNotNotify] + public Type Page { get; set; } + + [DoNotNotify] + public object Parameters { get; set; } + + [DoNotNotify] + public bool NeedLogin { get; set; } + + public bool Show { get; set; } + } +} \ No newline at end of file diff --git a/src/BiliLite.UWP/ViewModels/Home/HomeViewModel.cs b/src/BiliLite.UWP/ViewModels/Home/HomeViewModel.cs new file mode 100644 index 00000000..026eef5f --- /dev/null +++ b/src/BiliLite.UWP/ViewModels/Home/HomeViewModel.cs @@ -0,0 +1,71 @@ +using System.Collections.ObjectModel; +using System.Linq; +using System.Threading.Tasks; +using AutoMapper; +using BiliLite.Models.Common; +using BiliLite.Models.Common.Home; +using BiliLite.Modules; +using BiliLite.Services; +using BiliLite.ViewModels.Common; +using Microsoft.Extensions.DependencyInjection; + +namespace BiliLite.ViewModels.Home +{ + public class HomeViewModel : BaseViewModel + { + #region Fields + + private readonly IMapper m_mapper; + private readonly Account m_account; + + #endregion + + #region Constructors + + public HomeViewModel() + { + m_account = new Account(); + m_mapper = App.ServiceProvider.GetRequiredService(); + var homeNavItemList = SettingService.GetValue(SettingConstants.UI.HOEM_ORDER, DefaultHomeNavItems.GetDefaultHomeNavItems()); + HomeNavItems = m_mapper.Map>(homeNavItemList); + SelectItem = HomeNavItems.FirstOrDefault(); + if (!SettingService.Account.Logined) return; + IsLogin = true; + foreach (var item in HomeNavItems) + { + if (!item.Show && item.NeedLogin) item.Show = true; + } + } + + #endregion + + #region Properties + + public ObservableCollection HomeNavItems { get; set; } + + public HomeNavItemViewModel SelectItem { get; set; } + + public bool IsLogin { get; set; } + + public HomeUserCardModel Profile { get; set; } + + public ObservableCollection SuggestSearchContents { get; set; } + + #endregion + + #region Public Methods + + public async Task LoginUserCard() + { + var data = await m_account.GetHomeUserCard(); + if (data != null) + { + Profile = data; + return; + } + //检查Token + } + + #endregion + } +}