Skip to content

Commit

Permalink
update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
tmm360 committed May 28, 2023
1 parent 1bb070d commit ae8577f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<ItemGroup>
<PackageReference Include="Bee.Net" Version="0.2.0-alpha.189" />
<PackageReference Include="Blurhash.SkiaSharp" Version="2.0.0" />
<PackageReference Include="Etherna.YoutubeDownloader.Converter" Version="6.3.3" />
<PackageReference Include="Etherna.YoutubeDownloader.Converter" Version="6.3.4" />
<PackageReference Include="EthernaServicesClient" Version="0.3.0-alpha.60" />
<PackageReference Include="GitVersion.MsBuild" Version="5.12.0">
<PrivateAssets>all</PrivateAssets>
Expand All @@ -46,7 +46,7 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="SkiaSharp.NativeAssets.Linux.NoDependencies" Version="2.88.3" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.30.0" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.30.1" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="YamlDotNet" Version="13.0.2" />
<PackageReference Include="YamlDotNet" Version="13.1.0" />
</ItemGroup>

<ItemGroup>
Expand Down
8 changes: 1 addition & 7 deletions src/EthernaVideoImporter.Devcon/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -261,13 +261,7 @@ static async Task Main(string[] args)
},
useBeeNativeNode,
authResult.RefreshTokenHandler);
services.AddTransient<IYoutubeClient>(_ =>
ffMpegHwAcceleration switch
{
FFMpegHwAccelerations.None => new YoutubeClient(),
FFMpegHwAccelerations.Cuda => new YoutubeClient("cuda"),
_ => throw new InvalidOperationException()
});
services.AddTransient<IYoutubeClient, YoutubeClient>();
services.AddTransient<IYoutubeDownloader, YoutubeDownloader>();
services.AddTransient<IVideoProvider, MdVideoProvider>();

Expand Down
21 changes: 4 additions & 17 deletions src/EthernaVideoImporter/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,8 @@ static async Task Main(string[] args)
services.AddSingleton<IValidateOptions<YouTubeChannelVideoProviderOptions>, YouTubeChannelVideoProviderOptionsValidation>();

//services
AddYoutubeDownloader(services, ffMpegHwAcceleration);
services.AddTransient<IYoutubeClient, YoutubeClient>();
services.AddTransient<IYoutubeDownloader, YoutubeDownloader>();
services.AddTransient<IVideoProvider, YouTubeChannelVideoProvider>();
break;
case SourceType.YouTubeVideo:
Expand All @@ -320,7 +321,8 @@ static async Task Main(string[] args)
services.AddSingleton<IValidateOptions<YouTubeSingleVideoProviderOptions>, YouTubeSingleVideoProviderOptionsValidation>();

//services
AddYoutubeDownloader(services, ffMpegHwAcceleration);
services.AddTransient<IYoutubeClient, YoutubeClient>();
services.AddTransient<IYoutubeDownloader, YoutubeDownloader>();
services.AddTransient<IVideoProvider, YouTubeSingleVideoProvider>();
break;
default:
Expand All @@ -340,20 +342,5 @@ await importer.RunAsync(
userEthAddr,
unpinRemovedVideos);
}

// Helpers.
private static void AddYoutubeDownloader(
ServiceCollection services,
FFMpegHwAccelerations hwAcceleration)
{
services.AddTransient<IYoutubeClient>(_ =>
hwAcceleration switch
{
FFMpegHwAccelerations.None => new YoutubeClient(),
FFMpegHwAccelerations.Cuda => new YoutubeClient("cuda"),
_ => throw new InvalidOperationException()
});
services.AddTransient<IYoutubeDownloader, YoutubeDownloader>();
}
}
}

0 comments on commit ae8577f

Please sign in to comment.