[CHANGE] Small fixes
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
using Manager.App.Components.Dialogs;
|
using Manager.App.Components.Dialogs;
|
||||||
using Manager.App.Models.Library;
|
using Manager.App.Models.Library;
|
||||||
using Manager.Data.Entities.LibraryContext;
|
using Manager.Data.Entities.LibraryContext;
|
||||||
using Manager.YouTube;
|
|
||||||
using Microsoft.AspNetCore.Components;
|
using Microsoft.AspNetCore.Components;
|
||||||
using MudBlazor;
|
using MudBlazor;
|
||||||
|
|
||||||
@@ -44,5 +43,7 @@ public partial class Channels : ComponentBase
|
|||||||
{
|
{
|
||||||
Snackbar.Add($"Client {client.External.Channel?.Handle ?? client.Id} saved!", Severity.Success);
|
Snackbar.Add($"Client {client.External.Channel?.Handle ?? client.Id} saved!", Severity.Success);
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
|
await InvokeAsync(StateHasChanged);
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -27,7 +27,7 @@ public static class DependencyInjection
|
|||||||
|
|
||||||
builder.Services.AddScoped<ILibraryService, LibraryService>();
|
builder.Services.AddScoped<ILibraryService, LibraryService>();
|
||||||
|
|
||||||
/*builder.Services.AddHostedService<ClientManager>();*/
|
builder.Services.AddHostedService<ClientManager>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void SetupSettings(this WebApplicationBuilder builder)
|
public static void SetupSettings(this WebApplicationBuilder builder)
|
||||||
|
@@ -14,6 +14,7 @@ public sealed class YouTubeClient : IDisposable
|
|||||||
{
|
{
|
||||||
public string Id { get; private set; } = "";
|
public string Id { get; private set; } = "";
|
||||||
public string? UserAgent { get; set; }
|
public string? UserAgent { get; set; }
|
||||||
|
public bool IsAnonymous { get; }
|
||||||
public CookieContainer CookieContainer { get; } = new() { PerDomainCapacity = 50 };
|
public CookieContainer CookieContainer { get; } = new() { PerDomainCapacity = 50 };
|
||||||
public ClientState? State { get; private set; }
|
public ClientState? State { get; private set; }
|
||||||
public List<string> DatasyncIds { get; } = [];
|
public List<string> DatasyncIds { get; } = [];
|
||||||
@@ -30,6 +31,7 @@ public sealed class YouTubeClient : IDisposable
|
|||||||
if (cookies.Count == 0)
|
if (cookies.Count == 0)
|
||||||
{
|
{
|
||||||
Id = $"anon_{Guid.NewGuid()}";
|
Id = $"anon_{Guid.NewGuid()}";
|
||||||
|
IsAnonymous = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
CookieContainer.Add(cookies);
|
CookieContainer.Add(cookies);
|
||||||
|
Reference in New Issue
Block a user