Skip to content

Commit

Permalink
Chore: rename OpenAI
Browse files Browse the repository at this point in the history
  • Loading branch information
xjasonlyu committed Mar 26, 2023
1 parent 78457a9 commit 8815464
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
18 changes: 9 additions & 9 deletions Jellyfin.Plugin.MetaTube/Configuration/configPage.html
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ <h2 class="sectionTitle">Translation</h2>
<option value="Google">Google</option>
<option value="GoogleFree">Google (Free)</option>
<option value="DeepL">DeepL (Free)</option>
<option value="OpenAI">OpenAI</option>
<option value="OpenAi">OpenAI</option>
</select>
</div>

Expand Down Expand Up @@ -206,7 +206,7 @@ <h2 class="sectionTitle">Translation</h2>
</div>
</div>

<div class="selectTranslationEngineOpenAI">
<div class="selectTranslationEngineOpenAi">
<div class="inputContainer">
<label class="inputLabel inputLabelUnfocused" for="txtOpenAiApiKey">OpenAI api key:</label>
<input id="txtOpenAiApiKey" is="emby-input" name="txtOpenAiApiKey" type="text"/>
Expand Down Expand Up @@ -288,32 +288,32 @@ <h2 class="sectionTitle">Substitution</h2>
$('.selectTranslationEngineBaidu').css('display', 'inherit');
$('.selectTranslationEngineGoogle').css('display', 'none');
$('.selectTranslationEngineDeepL').css('display', 'none');
$('.selectTranslationEngineOpenAI').css('display', 'none');
$('.selectTranslationEngineOpenAi').css('display', 'none');
} else if (this.value === "Google") {
$('.selectTranslationEngineBaidu').css('display', 'none');
$('.selectTranslationEngineGoogle').css('display', 'inherit');
$('.selectTranslationEngineDeepL').css('display', 'none');
$('.selectTranslationEngineOpenAI').css('display', 'none');
$('.selectTranslationEngineOpenAi').css('display', 'none');
} else if (this.value === "GoogleFree") {
$('.selectTranslationEngineBaidu').css('display', 'none');
$('.selectTranslationEngineGoogle').css('display', 'none');
$('.selectTranslationEngineDeepL').css('display', 'none');
$('.selectTranslationEngineOpenAI').css('display', 'none');
$('.selectTranslationEngineOpenAi').css('display', 'none');
} else if (this.value === "DeepL") {
$('.selectTranslationEngineBaidu').css('display', 'none');
$('.selectTranslationEngineGoogle').css('display', 'none');
$('.selectTranslationEngineDeepL').css('display', 'inherit');
$('.selectTranslationEngineOpenAI').css('display', 'none');
} else if (this.value === "OpenAI") {
$('.selectTranslationEngineOpenAi').css('display', 'none');
} else if (this.value === "OpenAi") {
$('.selectTranslationEngineBaidu').css('display', 'none');
$('.selectTranslationEngineGoogle').css('display', 'none');
$('.selectTranslationEngineDeepL').css('display', 'none');
$('.selectTranslationEngineOpenAI').css('display', 'inherit');
$('.selectTranslationEngineOpenAi').css('display', 'inherit');
} else {
$('.selectTranslationEngineBaidu').css('display', 'none');
$('.selectTranslationEngineGoogle').css('display', 'none');
$('.selectTranslationEngineDeepL').css('display', 'none');
$('.selectTranslationEngineOpenAI').css('display', 'none');
$('.selectTranslationEngineOpenAi').css('display', 'none');
}
});

Expand Down
2 changes: 1 addition & 1 deletion Jellyfin.Plugin.MetaTube/Translation/TranslationEngine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ public enum TranslationEngine
Google,
GoogleFree,
DeepL,
OpenAI
OpenAi
}
2 changes: 1 addition & 1 deletion Jellyfin.Plugin.MetaTube/Translation/TranslationHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ private static async Task<string> TranslateAsync(string q, string from, string t
{ "deepl-api-key", Configuration.DeepLApiKey }
});
break;
case TranslationEngine.OpenAI:
case TranslationEngine.OpenAi:
millisecondsDelay = 1000;
nv.Add(new NameValueCollection
{
Expand Down

0 comments on commit 8815464

Please sign in to comment.