From 94ec5fa595f1c9c0f07d6c003c3e24b750611d90 Mon Sep 17 00:00:00 2001
From: randoman <738b86bb93c44695854182cc459afcbb@lonestar.no>
Date: Sat, 19 Jun 2021 09:47:43 +0200
Subject: [PATCH] Version 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
---
CHANGELOG.md | 6 +++++-
.../ExtDeepLTranslateLegitimate.cs | 2 +-
src/XUnity.AutoTranslator.Patcher/Patcher.cs | 2 +-
.../XUnity.AutoTranslator.Plugin.BepIn-5x.csproj | 2 +-
.../AutoTranslationPlugin.cs | 2 +-
.../Constants/PluginData.cs | 2 +-
.../Endpoints/Http/HttpEndpoint.cs | 2 +-
.../Endpoints/Www/WwwEndpoint.cs | 2 +-
.../XUnity.AutoTranslator.Plugin.Core.csproj | 2 +-
.../XUnity.AutoTranslator.Plugin.ExtProtocol.csproj | 2 +-
.../XUnity.AutoTranslator.Plugin.IPA.csproj | 2 +-
.../XUnity.AutoTranslator.Plugin.UnityInjector.csproj | 2 +-
.../XUnity.AutoTranslator.Setup.csproj | 2 +-
13 files changed, 17 insertions(+), 13 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 630f263d..dd663049 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -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
diff --git a/src/Translators/DeepLTranslate.ExtProtocol/ExtDeepLTranslateLegitimate.cs b/src/Translators/DeepLTranslate.ExtProtocol/ExtDeepLTranslateLegitimate.cs
index a20e0eaa..00ddb3ce 100644
--- a/src/Translators/DeepLTranslate.ExtProtocol/ExtDeepLTranslateLegitimate.cs
+++ b/src/Translators/DeepLTranslate.ExtProtocol/ExtDeepLTranslateLegitimate.cs
@@ -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( "*/*" ) );
}
diff --git a/src/XUnity.AutoTranslator.Patcher/Patcher.cs b/src/XUnity.AutoTranslator.Patcher/Patcher.cs
index 4480d0e1..c3be8d41 100644
--- a/src/XUnity.AutoTranslator.Patcher/Patcher.cs
+++ b/src/XUnity.AutoTranslator.Patcher/Patcher.cs
@@ -29,7 +29,7 @@ public override string Version
{
get
{
- return "4.16.2";
+ return "4.16.3";
}
}
diff --git a/src/XUnity.AutoTranslator.Plugin.BepIn-5x/XUnity.AutoTranslator.Plugin.BepIn-5x.csproj b/src/XUnity.AutoTranslator.Plugin.BepIn-5x/XUnity.AutoTranslator.Plugin.BepIn-5x.csproj
index 4863a93e..21617240 100644
--- a/src/XUnity.AutoTranslator.Plugin.BepIn-5x/XUnity.AutoTranslator.Plugin.BepIn-5x.csproj
+++ b/src/XUnity.AutoTranslator.Plugin.BepIn-5x/XUnity.AutoTranslator.Plugin.BepIn-5x.csproj
@@ -2,7 +2,7 @@
net35
- 4.16.2
+ 4.16.3
diff --git a/src/XUnity.AutoTranslator.Plugin.Core/AutoTranslationPlugin.cs b/src/XUnity.AutoTranslator.Plugin.Core/AutoTranslationPlugin.cs
index 8d4e5f6d..7105fd31 100644
--- a/src/XUnity.AutoTranslator.Plugin.Core/AutoTranslationPlugin.cs
+++ b/src/XUnity.AutoTranslator.Plugin.Core/AutoTranslationPlugin.cs
@@ -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." );
diff --git a/src/XUnity.AutoTranslator.Plugin.Core/Constants/PluginData.cs b/src/XUnity.AutoTranslator.Plugin.Core/Constants/PluginData.cs
index d2a451d9..909c67fe 100644
--- a/src/XUnity.AutoTranslator.Plugin.Core/Constants/PluginData.cs
+++ b/src/XUnity.AutoTranslator.Plugin.Core/Constants/PluginData.cs
@@ -23,6 +23,6 @@ public static class PluginData
///
/// Gets the version of the plugin.
///
- public const string Version = "4.16.2";
+ public const string Version = "4.16.3";
}
}
diff --git a/src/XUnity.AutoTranslator.Plugin.Core/Endpoints/Http/HttpEndpoint.cs b/src/XUnity.AutoTranslator.Plugin.Core/Endpoints/Http/HttpEndpoint.cs
index ba70f311..34e0bd56 100644
--- a/src/XUnity.AutoTranslator.Plugin.Core/Endpoints/Http/HttpEndpoint.cs
+++ b/src/XUnity.AutoTranslator.Plugin.Core/Endpoints/Http/HttpEndpoint.cs
@@ -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.
///
- public int MaxConcurrency => 1;
+ public virtual int MaxConcurrency => 1;
///
/// Gets the maximum number of translations that can be served per translation request.
diff --git a/src/XUnity.AutoTranslator.Plugin.Core/Endpoints/Www/WwwEndpoint.cs b/src/XUnity.AutoTranslator.Plugin.Core/Endpoints/Www/WwwEndpoint.cs
index 063bd7b9..318b9f70 100644
--- a/src/XUnity.AutoTranslator.Plugin.Core/Endpoints/Www/WwwEndpoint.cs
+++ b/src/XUnity.AutoTranslator.Plugin.Core/Endpoints/Www/WwwEndpoint.cs
@@ -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.
///
- public int MaxConcurrency => 1;
+ public virtual int MaxConcurrency => 1;
///
/// Gets the maximum number of translations that can be served per translation request.
diff --git a/src/XUnity.AutoTranslator.Plugin.Core/XUnity.AutoTranslator.Plugin.Core.csproj b/src/XUnity.AutoTranslator.Plugin.Core/XUnity.AutoTranslator.Plugin.Core.csproj
index e0334e1c..f94bd622 100644
--- a/src/XUnity.AutoTranslator.Plugin.Core/XUnity.AutoTranslator.Plugin.Core.csproj
+++ b/src/XUnity.AutoTranslator.Plugin.Core/XUnity.AutoTranslator.Plugin.Core.csproj
@@ -11,7 +11,7 @@
True
True
net35
- 4.16.2
+ 4.16.3
latest
true
diff --git a/src/XUnity.AutoTranslator.Plugin.ExtProtocol/XUnity.AutoTranslator.Plugin.ExtProtocol.csproj b/src/XUnity.AutoTranslator.Plugin.ExtProtocol/XUnity.AutoTranslator.Plugin.ExtProtocol.csproj
index a22e5cb0..2ee918f4 100644
--- a/src/XUnity.AutoTranslator.Plugin.ExtProtocol/XUnity.AutoTranslator.Plugin.ExtProtocol.csproj
+++ b/src/XUnity.AutoTranslator.Plugin.ExtProtocol/XUnity.AutoTranslator.Plugin.ExtProtocol.csproj
@@ -19,7 +19,7 @@
- C:\Proj\Secret\XUnity.AutoTranslator\src\XUnity.AutoTranslator.Plugin.ExtProtocol\bin\Release\net35\XUnity.AutoTranslator.Plugin.ExtProtocol.xml
+ bin\Release\net35\XUnity.AutoTranslator.Plugin.ExtProtocol.xml
diff --git a/src/XUnity.AutoTranslator.Plugin.IPA/XUnity.AutoTranslator.Plugin.IPA.csproj b/src/XUnity.AutoTranslator.Plugin.IPA/XUnity.AutoTranslator.Plugin.IPA.csproj
index cfd29f48..0fa352de 100644
--- a/src/XUnity.AutoTranslator.Plugin.IPA/XUnity.AutoTranslator.Plugin.IPA.csproj
+++ b/src/XUnity.AutoTranslator.Plugin.IPA/XUnity.AutoTranslator.Plugin.IPA.csproj
@@ -2,7 +2,7 @@
net35
- 4.16.2
+ 4.16.3
diff --git a/src/XUnity.AutoTranslator.Plugin.UnityInjector/XUnity.AutoTranslator.Plugin.UnityInjector.csproj b/src/XUnity.AutoTranslator.Plugin.UnityInjector/XUnity.AutoTranslator.Plugin.UnityInjector.csproj
index 2dd66e11..1fb3c464 100644
--- a/src/XUnity.AutoTranslator.Plugin.UnityInjector/XUnity.AutoTranslator.Plugin.UnityInjector.csproj
+++ b/src/XUnity.AutoTranslator.Plugin.UnityInjector/XUnity.AutoTranslator.Plugin.UnityInjector.csproj
@@ -2,7 +2,7 @@
net35
- 4.16.2
+ 4.16.3
diff --git a/src/XUnity.AutoTranslator.Setup/XUnity.AutoTranslator.Setup.csproj b/src/XUnity.AutoTranslator.Setup/XUnity.AutoTranslator.Setup.csproj
index 97d73de4..a675eb22 100644
--- a/src/XUnity.AutoTranslator.Setup/XUnity.AutoTranslator.Setup.csproj
+++ b/src/XUnity.AutoTranslator.Setup/XUnity.AutoTranslator.Setup.csproj
@@ -4,7 +4,7 @@
Exe
net40
SetupReiPatcherAndAutoTranslator
- 4.16.2
+ 4.16.3
icon.ico