Added proper slave mode - additional clients after the first connection. Fixed a few issues. Updated to version 4.8.2.

This commit is contained in:
Tom
2025-03-06 16:05:15 +00:00
parent cbdca1c008
commit 622b359b12
17 changed files with 146 additions and 33 deletions

View File

@@ -33,13 +33,7 @@ namespace TwitchChatTTS.Hermes.Socket.Requests
return;
}
var userId = requestData["user"].ToString();
var voiceId = requestData["voice"].ToString();
if (string.IsNullOrEmpty(userId))
{
_logger.Warning("User Id is invalid.");
return;
}
if (string.IsNullOrEmpty(voiceId))
{
_logger.Warning("Voice Id is invalid.");
@@ -52,7 +46,7 @@ namespace TwitchChatTTS.Hermes.Socket.Requests
}
_user.VoicesSelected.Add(chatterId, voiceId);
_logger.Information($"Created a new TTS user [user id: {userId}][voice id: {voiceId}][voice name: {voiceName}].");
_logger.Information($"Created a new TTS user [chatter id: {_user.TwitchUserId}][chatter id: {chatterId}][voice id: {voiceId}][voice name: {voiceName}].");
}
}
}

View File

@@ -54,7 +54,7 @@ namespace TwitchChatTTS.Hermes.Socket.Requests
foreach (var permission in groupInfo.GroupPermissions)
{
_logger.Debug($"Adding group permission [permission id: {permission.Id}][group id: {permission.GroupId}][path: {permission.Path}][allow: {permission.Allow?.ToString() ?? "null"}]");
if (!groupsById.TryGetValue(permission.GroupId, out var group))
if (!groupsById.TryGetValue(permission.GroupId.ToString(), out var group))
{
_logger.Warning($"Failed to find group by id [permission id: {permission.Id}][group id: {permission.GroupId}][path: {permission.Path}]");
continue;

View File

@@ -33,13 +33,7 @@ namespace TwitchChatTTS.Hermes.Socket.Requests
return;
}
var userId = requestData["user"].ToString();
var voiceId = requestData["voice"].ToString();
if (string.IsNullOrEmpty(userId))
{
_logger.Warning("User Id is invalid.");
return;
}
if (string.IsNullOrEmpty(voiceId))
{
_logger.Warning("Voice Id is invalid.");
@@ -52,7 +46,7 @@ namespace TwitchChatTTS.Hermes.Socket.Requests
}
_user.VoicesSelected[chatterId] = voiceId;
_logger.Information($"Updated a TTS user's voice [user id: {userId}][voice: {voiceId}][voice name: {voiceName}]");
_logger.Information($"Updated a TTS user's voice [user id: {_user.TwitchUserId}][voice: {voiceId}][voice name: {voiceName}]");
}
}
}