Skip to content

Commit

Permalink
Version 4.16.3
Browse files Browse the repository at this point in the history
 * MISC - Make "MaxConcurrency" property in HttpEndpoint and WwwEndpoint virtual
 * BUG FIX - Fixed bug that caused exception spam if no endpoint were selected
  • Loading branch information
randoman committed Jun 19, 2021
1 parent ce35ea8 commit 94ec5fa
Show file tree
Hide file tree
Showing 13 changed files with 17 additions and 13 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
### 4.16.2
### 4.16.3
* MISC - Make "MaxConcurrency" property in HttpEndpoint and WwwEndpoint virtual
* BUG FIX - Fixed bug that caused exception spam if no endpoint were selected

### 4.16.2
* BUG FIX - DeepLLegitimate no longer selectable if no API key has been configured

### 4.16.1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ private void CreateClientAndHandler()
_handler.AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate;

_client = new HttpClient( _handler, true );
_client.DefaultRequestHeaders.UserAgent.Add( new ProductInfoHeaderValue( "XUnity", "4.16.2" ) );
_client.DefaultRequestHeaders.UserAgent.Add( new ProductInfoHeaderValue( "XUnity", "4.16.3" ) );
_client.DefaultRequestHeaders.Accept.Add( new MediaTypeWithQualityHeaderValue( "*/*" ) );
}

Expand Down
2 changes: 1 addition & 1 deletion src/XUnity.AutoTranslator.Patcher/Patcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public override string Version
{
get
{
return "4.16.2";
return "4.16.3";
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFramework>net35</TargetFramework>
<Version>4.16.2</Version>
<Version>4.16.3</Version>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2333,7 +2333,7 @@ private string TranslateOrQueueWebJobImmediate(
private TranslationEndpointManager GetTranslationEndpoint( ParserTranslationContext context, bool allowFallback )
{
var endpoint = context?.Endpoint ?? TranslationManager.CurrentEndpoint;
if( allowFallback && endpoint.HasFailedDueToConsecutiveErrors && TranslationManager.IsFallbackAvailableFor( endpoint ) )
if( allowFallback && endpoint != null && endpoint.HasFailedDueToConsecutiveErrors && TranslationManager.IsFallbackAvailableFor( endpoint ) )
{
XuaLogger.AutoTranslator.Warn( "Falling back to fallback translator in order to perform translation." );

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ public static class PluginData
/// <summary>
/// Gets the version of the plugin.
/// </summary>
public const string Version = "4.16.2";
public const string Version = "4.16.3";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public abstract class HttpEndpoint : ITranslateEndpoint
/// Gets the maximum concurrency for the endpoint. This specifies how many times "Translate"
/// can be called before it returns.
/// </summary>
public int MaxConcurrency => 1;
public virtual int MaxConcurrency => 1;

/// <summary>
/// Gets the maximum number of translations that can be served per translation request.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public abstract class WwwEndpoint : ITranslateEndpoint
/// Gets the maximum concurrency for the endpoint. This specifies how many times "Translate"
/// can be called before it returns.
/// </summary>
public int MaxConcurrency => 1;
public virtual int MaxConcurrency => 1;

/// <summary>
/// Gets the maximum number of translations that can be served per translation request.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<DevelopmentDependency>True</DevelopmentDependency>
<TargetFramework>net35</TargetFramework>
<Version>4.16.2</Version>
<Version>4.16.3</Version>
<LangVersion>latest</LangVersion>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
</ItemGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<DocumentationFile>C:\Proj\Secret\XUnity.AutoTranslator\src\XUnity.AutoTranslator.Plugin.ExtProtocol\bin\Release\net35\XUnity.AutoTranslator.Plugin.ExtProtocol.xml</DocumentationFile>
<DocumentationFile>bin\Release\net35\XUnity.AutoTranslator.Plugin.ExtProtocol.xml</DocumentationFile>
</PropertyGroup>

<Target Name="PostBuild" AfterTargets="PostBuildEvent">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFramework>net35</TargetFramework>
<Version>4.16.2</Version>
<Version>4.16.3</Version>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFramework>net35</TargetFramework>
<Version>4.16.2</Version>
<Version>4.16.3</Version>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<OutputType>Exe</OutputType>
<TargetFramework>net40</TargetFramework>
<AssemblyName>SetupReiPatcherAndAutoTranslator</AssemblyName>
<Version>4.16.2</Version>
<Version>4.16.3</Version>
<ApplicationIcon>icon.ico</ApplicationIcon>
<Win32Resource />
</PropertyGroup>
Expand Down

0 comments on commit 94ec5fa

Please sign in to comment.