From 6eb955e768fc2bb78bc8eb871ba827721c3f5ba0 Mon Sep 17 00:00:00 2001 From: CHKZL Date: Mon, 1 Jul 2024 13:29:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=A0=87=E9=A2=98=E8=A7=A3?= =?UTF-8?q?=E6=9E=90=E6=A0=BC=E5=BC=8F=EF=BC=8C=E9=98=B2=E6=AD=A2=E5=8F=91?= =?UTF-8?q?=E6=A0=87=E9=A2=98=E7=89=B9=E6=AE=8A=E7=AC=A6=E5=8F=B7=E5=BD=93?= =?UTF-8?q?=E4=BD=9C=E8=B7=AF=E5=BE=84=E5=88=86=E5=89=B2=E7=AC=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Core/RuntimeObject/RoomInfo.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Core/RuntimeObject/RoomInfo.cs b/Core/RuntimeObject/RoomInfo.cs index 0c275803..3fe0400d 100644 --- a/Core/RuntimeObject/RoomInfo.cs +++ b/Core/RuntimeObject/RoomInfo.cs @@ -900,7 +900,7 @@ private static RoomCardClass ToRoomCard(UidsInfo_Class.Data data, RoomCardClass RoomCardClass card = new RoomCardClass() { UID = data.uid, - Title = new() { Value = data.title, ExpirationTime = DateTime.Now.AddSeconds(30) }, + Title = new() { Value = data.title.Replace("/","-").Replace("\\","-"), ExpirationTime = DateTime.Now.AddSeconds(30) }, RoomId = data.room_id, live_time = new() { Value = data.live_time, ExpirationTime = DateTime.Now.AddSeconds(30) }, live_status = new() { Value = data.live_status, ExpirationTime = DateTime.Now.AddSeconds(3) }, @@ -931,7 +931,7 @@ private static RoomCardClass ToRoomCard(UidsInfo_Class.Data data, RoomCardClass else { OldCard.UID = data.uid; - OldCard.Title = new() { Value = data.title, ExpirationTime = DateTime.Now.AddSeconds(30) }; + OldCard.Title = new() { Value = data.title.Replace("/","-").Replace("\\","-"), ExpirationTime = DateTime.Now.AddSeconds(30) }; OldCard.RoomId = data.room_id; OldCard.live_time = new() { Value = data.live_time, ExpirationTime = DateTime.Now.AddSeconds(30) }; @@ -1070,7 +1070,7 @@ private static RoomCardClass ToRoomCard(UserInfo userInfo, RoomCardClass OldCard Name = userInfo.data.name, url = new() { Value = $"https://live.bilibili.com/{userInfo.data.live_room.roomid}", ExpirationTime = DateTime.MaxValue }, roomStatus = new() { Value = userInfo.data.live_room.liveStatus, ExpirationTime = DateTime.Now.AddSeconds(3) }, - Title = new() { Value = userInfo.data.live_room.title, ExpirationTime = DateTime.Now.AddSeconds(30) }, + Title = new() { Value = userInfo.data.live_room.title.Replace("/","-").Replace("\\","-"), ExpirationTime = DateTime.Now.AddSeconds(30) }, cover_from_user = new() { Value = userInfo.data.live_room.cover, ExpirationTime = DateTime.Now.AddMinutes(10) }, face = new() { Value = userInfo.data.face, ExpirationTime = DateTime.MaxValue }, sex = new() { Value = userInfo.data.sex, ExpirationTime = DateTime.MaxValue }, @@ -1086,7 +1086,7 @@ private static RoomCardClass ToRoomCard(UserInfo userInfo, RoomCardClass OldCard OldCard.Name = userInfo.data.name; OldCard.url = new() { Value = $"https://live.bilibili.com/{userInfo.data.live_room.roomid}", ExpirationTime = DateTime.MaxValue }; OldCard.roomStatus = new() { Value = userInfo.data.live_room.liveStatus, ExpirationTime = DateTime.Now.AddSeconds(3) }; - OldCard.Title = new() { Value = userInfo.data.live_room.title, ExpirationTime = DateTime.Now.AddSeconds(30) }; + OldCard.Title = new() { Value = userInfo.data.live_room.title.Replace("/","-").Replace("\\","-"), ExpirationTime = DateTime.Now.AddSeconds(30) }; OldCard.cover_from_user = new() { Value = userInfo.data.live_room.cover, ExpirationTime = DateTime.Now.AddMinutes(10) }; OldCard.face = new() { Value = userInfo.data.face, ExpirationTime = DateTime.MaxValue }; OldCard.sex = new() { Value = userInfo.data.sex, ExpirationTime = DateTime.MaxValue };