Fixed TTS using StreamElements. Fixed several issues.
This commit is contained in:
10
TTS.cs
10
TTS.cs
@@ -22,8 +22,8 @@ namespace TwitchChatTTS
|
||||
public class TTS : IHostedService
|
||||
{
|
||||
public const int MAJOR_VERSION = 4;
|
||||
public const int MINOR_VERSION = 8;
|
||||
public const int PATCH_VERSION = 2;
|
||||
public const int MINOR_VERSION = 9;
|
||||
public const int PATCH_VERSION = 3;
|
||||
|
||||
private readonly User _user;
|
||||
private readonly HermesApiClient _hermesApiClient;
|
||||
@@ -84,7 +84,7 @@ namespace TwitchChatTTS
|
||||
|
||||
if (string.IsNullOrWhiteSpace(_configuration.Hermes?.Token))
|
||||
{
|
||||
_logger.Error("Tom to Speech API token not set in the yml file.");
|
||||
_logger.Error("Tom to Speech API token not set in the configuration file.");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -96,7 +96,7 @@ namespace TwitchChatTTS
|
||||
_logger.Error("Failed to fetch latest TTS version. Something went wrong.");
|
||||
return;
|
||||
}
|
||||
if (hermesVersion.MajorVersion > TTS.MAJOR_VERSION || hermesVersion.MajorVersion == TTS.MAJOR_VERSION && (hermesVersion.MinorVersion > TTS.MINOR_VERSION || hermesVersion.MinorVersion == TTS.MINOR_VERSION && (hermesVersion.PatchVersion == null || hermesVersion.PatchVersion > TTS.PATCH_VERSION)))
|
||||
if (hermesVersion.MajorVersion > MAJOR_VERSION || hermesVersion.MajorVersion == MAJOR_VERSION && (hermesVersion.MinorVersion > MINOR_VERSION || hermesVersion.MinorVersion == MINOR_VERSION && (hermesVersion.PatchVersion == null || hermesVersion.PatchVersion > PATCH_VERSION)))
|
||||
{
|
||||
_logger.Information($"A new update for TTS is avaiable! Version {hermesVersion.MajorVersion}.{hermesVersion.MinorVersion}.{hermesVersion.PatchVersion} is available at {hermesVersion.Download}");
|
||||
var changes = hermesVersion.Changelog.Split("\n");
|
||||
@@ -111,9 +111,9 @@ namespace TwitchChatTTS
|
||||
}
|
||||
|
||||
var disposables = new List<IDisposable>();
|
||||
var connected = _bus.GetTopic("tts_connected");
|
||||
|
||||
// 7tv
|
||||
var connected = _bus.GetTopic("tts_connected");
|
||||
disposables.Add(connected.FirstAsync().Subscribe(async (data) =>
|
||||
{
|
||||
if (data.Value is not User user)
|
||||
|
||||
Reference in New Issue
Block a user