Skip to content

Commit

Permalink
1.1.6 更新
Browse files Browse the repository at this point in the history
  • Loading branch information
SpaceTimee committed Sep 30, 2022
1 parent ba0744f commit 54f6ca1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions Ona-Pix.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
<PackageReleaseNotes>Yet Another Pixiv Tool</PackageReleaseNotes>
<Authors>Space Time</Authors>
<Company>Space Time</Company>
<AssemblyVersion>1.1.5</AssemblyVersion>
<Version>1.1.5</Version>
<FileVersion>1.1.5</FileVersion>
<InformationalVersion>1.1.5</InformationalVersion>
<AssemblyVersion>1.1.6</AssemblyVersion>
<Version>1.1.6</Version>
<FileVersion>1.1.6</FileVersion>
<InformationalVersion>1.1.6</InformationalVersion>
<PackageTags>Tool;Pixiv;Ona;Pix</PackageTags>
<ApplicationIcon>Ona-Pix-Logo.ico</ApplicationIcon>
<PackageIcon>Ona Pix Logo.png</PackageIcon>
Expand Down Expand Up @@ -69,7 +69,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="MaterialDesignThemes" Version="4.5.0" />
<PackageReference Include="MaterialDesignThemes" Version="4.6.1" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="SauceNET" Version="1.1.1" />
<PackageReference Include="WpfAnimatedGif" Version="2.0.2" />
Expand Down
6 changes: 3 additions & 3 deletions Windows/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public MainWindow(string[] args)
//填充被拖入到图标打开的文件的路径
if (args.Length >= 1 && File.Exists(args[0]))
{
if (Array.IndexOf(Define.FILE_SUFFIXES, Path.GetExtension(args[0])) != -1)
if (Array.IndexOf(Define.FILE_SUFFIXES, Path.GetExtension(args[0]).ToLower()) != -1)
InactiveSearchBox.Text = args[0];
else
throw new Exception("里面被塞入了奇怪的东西...");
Expand Down Expand Up @@ -185,7 +185,7 @@ private void ReveivingSpace_Drop(object sender, DragEventArgs e)
{
string[] path = (string[])e.Data.GetData(DataFormats.FileDrop);

if (Array.IndexOf(Define.FILE_SUFFIXES, Path.GetExtension(path[0])) != -1)
if (Array.IndexOf(Define.FILE_SUFFIXES, Path.GetExtension(path[0]).ToLower()) != -1)
ActiveSearchBox.Text = InactiveSearchBox.Text = path[0];
else
throw new Exception("里面被塞入了奇怪的东西...");
Expand Down Expand Up @@ -473,7 +473,7 @@ public static async Task<string> UploadFile(string filePath)
memoryStream.Write(endBoundaryBytes, 0, endBoundaryBytes.Length);

//配置图片上传请求的参数
HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create("https://sm.ms/api/v2/upload");
HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create("https://smms.app/api/v2/upload");
webRequest.Method = "POST";
webRequest.Headers.Add("Authorization", Secret.GetSmmsApiKey());
webRequest.ContentType = "multipart/form-data; boundary=" + boundary;
Expand Down

0 comments on commit 54f6ca1

Please sign in to comment.