fix: return -1 when not live
This commit is contained in:
1 parent
f543f377f6
commit
c786f10a03
1 file changed
+1
-1
@@ -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