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