Skip to content

Commit

Permalink
Merge pull request #16 from ywmoyue/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
ywmoyue authored Feb 9, 2023
2 parents c6a2a5f + 52da1b8 commit 1f2c19c
Show file tree
Hide file tree
Showing 48 changed files with 584 additions and 378 deletions.
6 changes: 3 additions & 3 deletions document/new_version.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": "4.4.11",
"version_num": 40411,
"version_desc": "更新内容:\r\n\r\n* 修复扫码登录\r\n\r\n* 修复密码登录\r\n\r\n\r\n 如果无法打开下载地址,请访问:https://github.com/ywmoyue/biliuwp-lite/releases",
"version": "4.5.0",
"version_num": 40500,
"version_desc": "更新内容:\r\n\r\n* 支持视频详情页右侧宽度可调整\r\n\r\n* 支持设置鼠标中键行为\r\n\r\n* 修复屏蔽词接口和调用错误问题\r\n\r\n* 修复下载视频导出错误\r\n\r\n* 修复视频评论、回复视频评论、删除回复错误\r\n\r\n\r\n 如果无法打开下载地址,请访问:https://github.com/ywmoyue/biliuwp-lite/releases",
"url": "https://github.com/ywmoyue/biliuwp-lite/releases",
"download_url": "https://github.com/ywmoyue/biliuwp-lite/releases"
}
4 changes: 2 additions & 2 deletions src/BiliLite.Packages/BiliLite.Packages.wapproj
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@
<AppxPackageSigningEnabled>True</AppxPackageSigningEnabled>
<NoWarn>$(NoWarn);NU1702</NoWarn>
<EntryPointProjectUniqueName>..\BiliLite.UWP\BiliLite.UWP.csproj</EntryPointProjectUniqueName>
<PackageCertificateThumbprint>6EDD81B901CE43EA1F3485C541A512162E97B33C</PackageCertificateThumbprint>
<PackageCertificateThumbprint>32750103AFAB838C7F3755E5FD635CA4F0B72649</PackageCertificateThumbprint>
<GenerateAppInstallerFile>False</GenerateAppInstallerFile>
<AppxPackageSigningTimestampDigestAlgorithm>SHA256</AppxPackageSigningTimestampDigestAlgorithm>
<AppxAutoIncrementPackageRevision>True</AppxAutoIncrementPackageRevision>
<AppxAutoIncrementPackageRevision>False</AppxAutoIncrementPackageRevision>
<GenerateTestArtifacts>True</GenerateTestArtifacts>
<AppxBundlePlatforms>x86|x64|arm|arm64</AppxBundlePlatforms>
<HoursBetweenUpdateChecks>0</HoursBetweenUpdateChecks>
Expand Down
8 changes: 4 additions & 4 deletions src/BiliLite.Packages/Package.appxmanifest
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
IgnorableNamespaces="uap rescap">

<Identity
Name="5421.502643927C6AD"
Publisher="CN=xiaoyaocz"
Version="4.4.8.0" />
Name="5422.502643927C6AD"
Publisher="CN=muyan"
Version="4.5.0.0" />
<mp:PhoneIdentity PhoneProductId="8bceed6a-7e89-4141-a693-923401d5b2ac" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>

<Properties>
<DisplayName>哔哩哔哩 UWP</DisplayName>
<PublisherDisplayName>逍遥橙子</PublisherDisplayName>
<PublisherDisplayName>木言</PublisherDisplayName>
<Logo>Images\StoreLogo.png</Logo>
</Properties>

Expand Down
14 changes: 11 additions & 3 deletions src/BiliLite.UWP/Api/CommentApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public ApiModel Comment(string oid, CommentSort sort,int pn, int type, int ps =
//api.parameter += ApiHelper.GetSign(api.parameter, ApiHelper.AndroidKey);
return api;
}

public ApiModel Reply(string oid,string root, int pn, int type, int ps = 30)
{
ApiModel api = new ApiModel()
Expand Down Expand Up @@ -68,33 +69,40 @@ public ApiModel Like(string oid, string root, int action, int type)

public ApiModel ReplyComment(string oid, string root, string parent, string message, int type)
{
var csrf = Utils.GetCSRFToken();
ApiModel api = new ApiModel()
{
method = RestSharp.Method.Post,
baseUrl = $"{ApiHelper.API_BASE_URL}/x/v2/reply/add",
body = $"&oid={oid}&root={root}&parent={parent}&type={type}&message={message}"
body = $"&oid={oid}&root={root}&parent={parent}&type={type}&message={message}&csrf={csrf}",
need_cookie = true,
};
// api.body += ApiHelper.GetSign(api.body, ApiHelper.AndroidKey);
return api;
}

public ApiModel DeleteComment(string oid, string rpid, int type)
{
var csrf = Utils.GetCSRFToken();
ApiModel api = new ApiModel()
{
method = RestSharp.Method.Post,
baseUrl = $"{ApiHelper.API_BASE_URL}/x/v2/reply/del",
body = $"&oid={oid}&rpid={rpid}&type={type}"
body = $"&oid={oid}&rpid={rpid}&type={type}&csrf={csrf}",
need_cookie = true,
};
// api.body += ApiHelper.GetSign(api.body, ApiHelper.AndroidKey);
return api;
}
public ApiModel AddComment(string oid, CommentType type,string message)
{
var csrf = Utils.GetCSRFToken();
ApiModel api = new ApiModel()
{
method = RestSharp.Method.Post,
baseUrl = $"{ApiHelper.API_BASE_URL}/x/v2/reply/add",
body = $"&oid={oid}&type={(int)type}&message={Uri.EscapeDataString(message)}"
body = $"&oid={oid}&type={(int)type}&message={Uri.EscapeDataString(message)}&csrf={csrf}",
need_cookie = true,
};
//api.body += ApiHelper.GetSign(api.body, ApiHelper.AndroidKey);
return api;
Expand Down
8 changes: 4 additions & 4 deletions src/BiliLite.UWP/Api/PlayerAPI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -203,9 +203,9 @@ public ApiModel GetDanmuFilterWords()
{
method = RestSharp.Method.Get,
baseUrl = $"{ApiHelper.API_BASE_URL}/x/dm/filter/user",
parameter = ApiHelper.MustParameter(ApiHelper.AndroidVideoKey, true)
parameter = ApiHelper.MustParameter(ApiHelper.AndroidKey, true)
};
api.parameter += ApiHelper.GetSign(api.parameter, ApiHelper.AndroidVideoKey);
api.parameter += ApiHelper.GetSign(api.parameter, ApiHelper.AndroidKey);
return api;
}

Expand All @@ -221,9 +221,9 @@ public ApiModel AddDanmuFilterWord(string word,int type)
{
method = RestSharp.Method.Post,
baseUrl = $"{ApiHelper.API_BASE_URL}/x/dm/filter/user/add",
body = ApiHelper.MustParameter(ApiHelper.AndroidVideoKey, true)+ $"&filter={Uri.EscapeDataString(word)}&type={type}"
body = ApiHelper.MustParameter(ApiHelper.AndroidKey, true)+ $"&filter={Uri.EscapeDataString(word)}&type={type}"
};
api.body += ApiHelper.GetSign(api.parameter, ApiHelper.AndroidVideoKey);
api.body += ApiHelper.GetSign(api.body, ApiHelper.AndroidKey);
return api;
}

Expand Down
2 changes: 2 additions & 0 deletions src/BiliLite.UWP/BiliLite.UWP.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@
<Compile Include="Dialogs\LoginDialog.xaml.cs">
<DependentUpon>LoginDialog.xaml</DependentUpon>
</Compile>
<Compile Include="Extensions\PointerRoutedEventArgsExtensions.cs" />
<Compile Include="Helpers\AppHelper.cs" />
<Compile Include="Helpers\BiliRequestBuilder.cs" />
<Compile Include="Helpers\CCToSrt.cs" />
Expand All @@ -272,6 +273,7 @@
</Compile>
<Compile Include="Models\ApiModel.cs" />
<Compile Include="Models\Common\BiliRequest.cs" />
<Compile Include="Models\Common\ChangeTitleEventArgs.cs" />
<Compile Include="Models\Common\Constants.cs" />
<Compile Include="Models\Dynamic\DynamicModel.cs" />
<Compile Include="Models\Dynamic\DynamicUserProfileModel.cs" />
Expand Down
21 changes: 21 additions & 0 deletions src/BiliLite.UWP/Extensions/PointerRoutedEventArgsExtensions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
using BiliLite.Helpers;
using BiliLite.Models.Common;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Input;

namespace BiliLite.Extensions
{
public static class PointerRoutedEventArgsExtensions
{
public static bool IsUseMiddleButton(this PointerRoutedEventArgs e, object sender)
{
var par = e.GetCurrentPoint(sender as UIElement).Properties.PointerUpdateKind;
return par == Windows.UI.Input.PointerUpdateKind.XButton1Pressed || par == Windows.UI.Input.PointerUpdateKind.MiddleButtonPressed;
}

public static bool IsMiddleButtonNewTap(this PointerRoutedEventArgs e, object sender)
{
return e.IsUseMiddleButton(sender) && SettingHelper.GetValue(SettingHelper.UI.MOUSE_MIDDLE_ACTION, (int)MouseMiddleActions.Back) == (int)MouseMiddleActions.NewTap;
}
}
}
Loading

0 comments on commit 1f2c19c

Please sign in to comment.