[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

@@ -69,25 +69,24 @@
<Columns> <Columns>
<TemplateColumn Title="Name"> <TemplateColumn Title="Name">
<CellTemplate> <CellTemplate>
<MudTextField Variant="Variant.Text" @bind-Value="@context.Item.Name" <MudText>@context.Item.Name</MudText>
Immediate/>
</CellTemplate> </CellTemplate>
</TemplateColumn> </TemplateColumn>
<TemplateColumn Title="Domain"> <TemplateColumn Title="Domain">
<CellTemplate> <CellTemplate>
<MudTextField Variant="Variant.Text" @bind-Value="@context.Item.Domain" <MudText>@context.Item.Domain</MudText>
Immediate/>
</CellTemplate>
</TemplateColumn>
<TemplateColumn Title="Value">
<CellTemplate>
<MudTextField Variant="Variant.Text" @bind-Value="@context.Item.Value"
Immediate/>
</CellTemplate> </CellTemplate>
</TemplateColumn> </TemplateColumn>
<TemplateColumn Title="Expires"> <TemplateColumn Title="Expires">
<CellTemplate> <CellTemplate>
@context.Item.Expires <MudText>@context.Item.Expires</MudText>
</CellTemplate>
</TemplateColumn>
<TemplateColumn Title="Value">
<CellTemplate>
<MudTooltip Text="@context.Item.Value">
<MudText Style="white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 250px;">@context.Item.Value</MudText>
</MudTooltip>
</CellTemplate> </CellTemplate>
</TemplateColumn> </TemplateColumn>
</Columns> </Columns>

View File

@@ -140,7 +140,6 @@ public sealed class YouTubeClient : IDisposable
return ResultError.Error(e, "Error while parsing JSON!"); return ResultError.Error(e, "Error while parsing JSON!");
} }
if (State == null) if (State == null)
{ {
return ResultError.Fail("Unable to parse client state!"); return ResultError.Fail("Unable to parse client state!");
@@ -148,7 +147,8 @@ public sealed class YouTubeClient : IDisposable
State.IsPremiumUser = clientStateResult.Value.Item2; 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) public async Task<Result<InnertubeChannel>> GetChannelByIdAsync(string channelId)