Added slave client in configuration.

This commit is contained in:
Tom 2024-12-02 21:25:12 +00:00
parent 893cd6f192
commit ea0550e99f
3 changed files with 5 additions and 4 deletions

View File

@ -62,7 +62,7 @@ namespace TwitchChatTTS.Chat.Messaging
var emoteUsage = GetEmoteUsage(fragments);
var tasks = new List<Task>();
if (_obs.Streaming)
if (_obs.Streaming && _configuration.Twitch?.Slave != true)
{
if (emoteUsage.NewEmotes.Any())
tasks.Add(_hermes.SendEmoteDetails(emoteUsage.NewEmotes));

View File

@ -14,8 +14,8 @@ namespace TwitchChatTTS
}
public class TwitchConfiguration {
public IEnumerable<string>? Channels;
public bool TtsWhenOffline;
public bool Slave;
public string? WebsocketUrl;
public string? ApiUrl;
}

5
TTS.cs
View File

@ -89,9 +89,10 @@ namespace TwitchChatTTS
var hermesVersion = await _hermesApiClient.GetLatestTTSVersion();
if (hermesVersion == null)
{
_logger.Warning("Failed to fetch latest TTS version. Skipping version check.");
_logger.Error("Failed to fetch latest TTS version. Something went wrong.");
return;
}
else if (hermesVersion.MajorVersion > TTS.MAJOR_VERSION || hermesVersion.MajorVersion == TTS.MAJOR_VERSION && hermesVersion.MinorVersion > TTS.MINOR_VERSION)
if (hermesVersion.MajorVersion > TTS.MAJOR_VERSION || hermesVersion.MajorVersion == TTS.MAJOR_VERSION && hermesVersion.MinorVersion > TTS.MINOR_VERSION)
{
_logger.Information($"A new update for TTS is avaiable! Version {hermesVersion.MajorVersion}.{hermesVersion.MinorVersion} is available at {hermesVersion.Download}");
var changes = hermesVersion.Changelog.Split("\n");