From b7510b2d2bb8cdfab9f2b6acc1fd80f6161ab7bb Mon Sep 17 00:00:00 2001 From: leiurayer <1432593898@qq.com> Date: Wed, 5 Feb 2025 22:59:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B4=E7=90=86=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Downkyi.Core/Bili/Web/Video.cs | 7 ------- src/Downkyi/App.axaml | 3 ++- src/Downkyi/ServiceLocator.cs | 11 +++++------ 3 files changed, 7 insertions(+), 14 deletions(-) diff --git a/src/Downkyi.Core/Bili/Web/Video.cs b/src/Downkyi.Core/Bili/Web/Video.cs index e64f2e9..b65ea33 100644 --- a/src/Downkyi.Core/Bili/Web/Video.cs +++ b/src/Downkyi.Core/Bili/Web/Video.cs @@ -21,13 +21,6 @@ internal class Video : IVideo _input = input; - // 设置wbi keys - var info = LoginInfo.GetNavigationInfo(); - var imgKey = info.Data.WbiImg.ImgUrl.Split('/').ToList().Last().Split('.')[0]; - var subKey = info.Data.WbiImg.SubUrl.Split('/').ToList().Last().Split('.')[0]; - var keys = new Tuple(imgKey, subKey); - WbiSign.SetKey(keys); - if (ParseEntrance.IsAvId(input) || ParseEntrance.IsAvUrl(input)) { long avid = ParseEntrance.GetAvId(input); diff --git a/src/Downkyi/App.axaml b/src/Downkyi/App.axaml index fce40ba..e014aed 100644 --- a/src/Downkyi/App.axaml +++ b/src/Downkyi/App.axaml @@ -3,7 +3,8 @@ xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:converter="using:Downkyi.Converter" - xmlns:local="using:Downkyi"> + xmlns:local="using:Downkyi" + RequestedThemeVariant="Light"> diff --git a/src/Downkyi/ServiceLocator.cs b/src/Downkyi/ServiceLocator.cs index 0c54da5..85be3c0 100644 --- a/src/Downkyi/ServiceLocator.cs +++ b/src/Downkyi/ServiceLocator.cs @@ -90,12 +90,12 @@ public static class ServiceLocator /// public static void ConfigureServices() { + if (_initialized) return; + // Register services - if (!_initialized) - { - _initialized = true; - Ioc.Default.ConfigureServices( - new ServiceCollection() + _initialized = true; + Ioc.Default.ConfigureServices( + new ServiceCollection() //Services .AddScoped() .AddSingleton() @@ -141,6 +141,5 @@ public static class ServiceLocator .AddSingleton() .AddSingleton() .BuildServiceProvider()); - } } } \ No newline at end of file