From a5e55e563e3d136fbe3336369dfe99af9978969c Mon Sep 17 00:00:00 2001 From: max Date: Mon, 8 Sep 2025 21:56:42 +0200 Subject: [PATCH] [CHANGE] Small fixes --- Manager.App/Components/Pages/Channels.razor.cs | 3 ++- Manager.App/DependencyInjection.cs | 2 +- Manager.YouTube/YouTubeClient.cs | 2 ++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Manager.App/Components/Pages/Channels.razor.cs b/Manager.App/Components/Pages/Channels.razor.cs index fe84519..99fcfbf 100644 --- a/Manager.App/Components/Pages/Channels.razor.cs +++ b/Manager.App/Components/Pages/Channels.razor.cs @@ -1,7 +1,6 @@ using Manager.App.Components.Dialogs; using Manager.App.Models.Library; using Manager.Data.Entities.LibraryContext; -using Manager.YouTube; using Microsoft.AspNetCore.Components; using MudBlazor; @@ -44,5 +43,7 @@ public partial class Channels : ComponentBase { Snackbar.Add($"Client {client.External.Channel?.Handle ?? client.Id} saved!", Severity.Success); }*/ + + await InvokeAsync(StateHasChanged); } } \ No newline at end of file diff --git a/Manager.App/DependencyInjection.cs b/Manager.App/DependencyInjection.cs index 0fae928..cb62380 100644 --- a/Manager.App/DependencyInjection.cs +++ b/Manager.App/DependencyInjection.cs @@ -27,7 +27,7 @@ public static class DependencyInjection builder.Services.AddScoped(); - /*builder.Services.AddHostedService();*/ + builder.Services.AddHostedService(); } public static void SetupSettings(this WebApplicationBuilder builder) diff --git a/Manager.YouTube/YouTubeClient.cs b/Manager.YouTube/YouTubeClient.cs index 7835e4b..eabca3b 100644 --- a/Manager.YouTube/YouTubeClient.cs +++ b/Manager.YouTube/YouTubeClient.cs @@ -14,6 +14,7 @@ public sealed class YouTubeClient : IDisposable { public string Id { get; private set; } = ""; public string? UserAgent { get; set; } + public bool IsAnonymous { get; } public CookieContainer CookieContainer { get; } = new() { PerDomainCapacity = 50 }; public ClientState? State { get; private set; } public List DatasyncIds { get; } = []; @@ -30,6 +31,7 @@ public sealed class YouTubeClient : IDisposable if (cookies.Count == 0) { Id = $"anon_{Guid.NewGuid()}"; + IsAnonymous = true; } CookieContainer.Add(cookies);