diff --git a/index.cs b/index.cs index e33243a..32785b7 100644 --- a/index.cs +++ b/index.cs @@ -45,7 +45,14 @@ static async Task GetLiveViewerCountAsync(TokenResponse tokenResponse) return -1; } - return ytResponse.Items[0].Stats.Viewers; + var total = 0; + + foreach (var item in ytResponse.Items) + { + total += item.Stats.Viewers; + } + + return total; } static async Task GetTokenResponseAsync(Settings settings) @@ -271,4 +278,4 @@ internal sealed partial class JsonContext : JsonSerializerContext { } -#endregion \ No newline at end of file +#endregion