Skip to content

Commit 18c4d21

Browse files
authored
修复直播清晰度切换问题 (#280)
1 parent 8ec07cd commit 18c4d21

File tree

3 files changed

+11
-15
lines changed

3 files changed

+11
-15
lines changed

src/Libs/Libs.Provider/LiveProvider/LiveProvider.cs

+4-9
Original file line numberDiff line numberDiff line change
@@ -62,21 +62,16 @@ public static async Task<LiveMediaInformation> GetLiveMediaInformationAsync(stri
6262
{ Query.RoomId, roomId.ToString() },
6363
{ Query.NoPlayUrl, "0" },
6464
{ Query.Qn, quality.ToString() },
65-
{ Query.Codec, Uri.EscapeDataString("0,1") },
66-
{ Query.Device, "phone" },
67-
{ Query.DeviceName, Uri.EscapeDataString("iphone 14 pro max") },
68-
{ Query.Dolby, "1" },
65+
{ Query.Codec, Uri.EscapeDataString("0,1,2") },
66+
{ Query.Dolby, "5" },
6967
{ Query.Format, Uri.EscapeDataString("0,1,2") },
70-
{ Query.Http, "1" },
7168
{ Query.OnlyAudio, audioOnly ? "1" : "0" },
72-
{ Query.OnlyVideo, "0" },
7369
{ Query.Protocol, Uri.EscapeDataString("0,1") },
74-
{ Query.NeedHdr, "0" },
7570
{ Query.Mask, "1" },
76-
{ Query.PlayType, "0" },
71+
{ "panorama", "1" },
7772
};
7873

79-
var request = await HttpProvider.GetRequestMessageAsync(HttpMethod.Get, Live.WebPlayInformation, queryParameter, RequestClientType.Web, needAppKey: true);
74+
var request = await HttpProvider.GetRequestMessageAsync(HttpMethod.Get, Live.WebPlayInformation, queryParameter, RequestClientType.IOS, needCookie: true, forceNoToken: true, needCsrf: true);
8075
var response = await HttpProvider.Instance.SendAsync(request);
8176
var result = await HttpProvider.ParseAsync<ServerResponse<LiveAppPlayInformation>>(response);
8277
return LiveAdapter.ConvertToLiveMediaInformation(result.Data);

src/Models/Models.BiliBili/User/ChatSessionListResponse.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ public class BiliChatMsg
167167
/// 接收方 Id.
168168
/// </summary>
169169
[JsonPropertyName("receiver_id")]
170-
public int ReceiverId { get; set; }
170+
public long ReceiverId { get; set; }
171171

172172
/// <summary>
173173
/// 内容.

src/ViewModels/Components/NotificationViewModel/NotificationViewModel.Tile.cs

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Copyright (c) Bili Copilot. All rights reserved.
22

33
using System.Collections.Generic;
4+
using System.Security;
45
using Bili.Copilot.Models.Data.Dynamic;
56
using Bili.Copilot.Models.Data.Pgc;
67
using Bili.Copilot.Models.Data.Video;
@@ -44,18 +45,18 @@ public static void UpdateTile(List<DynamicInformation> dynamics)
4445
<binding template="TileMedium" branding="name">
4546
<image src="{cover}" placement="background" hint-overlay="60" />
4647
<image src="{avatar}" placement="peek" hint-crop="circle" />
47-
<text hint-style="caption" hint-wrap="true">{title}</text>
48+
<text hint-style="caption" hint-wrap="true">{SecurityElement.Escape(title)}</text>
4849
</binding>
4950
<binding template="TileWide" branding="nameAndLogo">
5051
<image src="{cover}" placement="background" hint-overlay="60" />
51-
<text hint-maxLines="2" hint-style="base" hint-wrap="true">{title}</text>
52-
<text hint-style="caption">{publisher}</text>
52+
<text hint-maxLines="2" hint-style="base" hint-wrap="true">{SecurityElement.Escape(title)}</text>
53+
<text hint-style="caption">{SecurityElement.Escape(publisher)}</text>
5354
</binding>
5455
<binding template="TileLarge" branding="nameAndLogo">
5556
<image src="{cover}" placement="background" hint-overlay="60" />
56-
<text hint-style="subtitle" hint-wrap="true">{title}</text>
57+
<text hint-style="subtitle" hint-wrap="true">{SecurityElement.Escape(title)}</text>
5758
<text hint-style="base"></text>
58-
<text hint-style="base">{publisher}</text>
59+
<text hint-style="base">{SecurityElement.Escape(publisher)}</text>
5960
</binding>
6061
</visual>
6162
</tile>

0 commit comments

Comments
 (0)