整理代码

v2.0.x
leiurayer 8 months ago
parent 85927def1a
commit b7510b2d2b

@ -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<string, string>(imgKey, subKey);
WbiSign.SetKey(keys);
if (ParseEntrance.IsAvId(input) || ParseEntrance.IsAvUrl(input))
{
long avid = ParseEntrance.GetAvId(input);

@ -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">
<Application.DataTemplates>
<local:ViewLocator />
</Application.DataTemplates>

@ -90,12 +90,12 @@ public static class ServiceLocator
/// </summary>
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<BaseServices>()
.AddSingleton<IBroadcastEvent, BroadcastEvent>()
@ -141,6 +141,5 @@ public static class ServiceLocator
.AddSingleton<PublicFavoritesViewModel>()
.AddSingleton<VideoDetailViewModel>()
.BuildServiceProvider());
}
}
}
Loading…
Cancel
Save