[CHANGE] Added cookie rotation with state. Updated cookie table

This commit is contained in:
max
2025-09-28 18:05:52 +02:00
parent abc1505b6e
commit c170b8db1f
2 changed files with 13 additions and 14 deletions

View File

@@ -140,15 +140,15 @@ public sealed class YouTubeClient : IDisposable
return ResultError.Error(e, "Error while parsing JSON!");
}
if (State == null)
{
return ResultError.Fail("Unable to parse client state!");
}
State.IsPremiumUser = clientStateResult.Value.Item2;
return Result.Success();
var cookieRotationResult = await RotateCookiesPageAsync();
return !cookieRotationResult.IsSuccess ? cookieRotationResult : Result.Success();
}
public async Task<Result<InnertubeChannel>> GetChannelByIdAsync(string channelId)