feat: total all viewers for all live broadcasts

This commit is contained in:
Stevan Freeborn
2026-01-01 22:14:44 -06:00
parent 9f2264cb92
commit ede381a91e
+9 -2
View File
@@ -45,7 +45,14 @@ static async Task<int> 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<TokenResponse> GetTokenResponseAsync(Settings settings)
@@ -271,4 +278,4 @@ internal sealed partial class JsonContext : JsonSerializerContext
{
}
#endregion
#endregion