fix: return -1 when not live
This commit is contained in:
@@ -42,7 +42,7 @@ static async Task<int> GetLiveViewerCountAsync(TokenResponse tokenResponse)
|
|||||||
|
|
||||||
if (ytResponse is null || ytResponse.Items.Length is 0)
|
if (ytResponse is null || ytResponse.Items.Length is 0)
|
||||||
{
|
{
|
||||||
throw new Exception(string.Empty);
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ytResponse.Items[0].Stats.Viewers;
|
return ytResponse.Items[0].Stats.Viewers;
|
||||||
|
|||||||
Reference in New Issue
Block a user