22using Fritz . StreamTools . Hubs ;
33using Fritz . Twitch ;
44using Fritz . Twitch . PubSub ;
5+ using Microsoft . AspNetCore . Hosting ;
56using Microsoft . AspNetCore . SignalR ;
67using Microsoft . Extensions . Configuration ;
78using Microsoft . Extensions . DependencyInjection ;
89using Microsoft . Extensions . Hosting ;
10+ using Microsoft . Extensions . Hosting . Internal ;
911using Microsoft . Extensions . Logging ;
1012using Microsoft . Extensions . Options ;
1113using System ;
@@ -27,11 +29,11 @@ public class TwitchPubSubService : IHostedService
2729 public static short _OldManCount = 0 ;
2830 private readonly Twitch . PubSub . Proxy _Proxy ;
2931 private readonly ConfigurationSettings _Configuration ;
30- private readonly IHostEnvironment _HostEnvironment ;
32+ private readonly IWebHostEnvironment _HostEnvironment ;
3133 private readonly ILogger _Logger ;
3234 private readonly Dictionary < string , Action < IHubContext < AttentionHub , IAttentionHubClient > > > _ChannelPointActions = new Dictionary < string , Action < IHubContext < AttentionHub , IAttentionHubClient > > > ( ) ;
3335
34- public TwitchPubSubService ( IServiceProvider serviceProvider , Twitch . PubSub . Proxy proxy , IHostEnvironment hostEnvironment , IOptions < ConfigurationSettings > settings , ILoggerFactory loggerFactory )
36+ public TwitchPubSubService ( IServiceProvider serviceProvider , Twitch . PubSub . Proxy proxy , IWebHostEnvironment hostEnvironment , IOptions < ConfigurationSettings > settings , ILoggerFactory loggerFactory )
3537 {
3638 _ServiceProvider = serviceProvider ;
3739 _Proxy = proxy ;
@@ -67,7 +69,7 @@ public Task StartAsync(CancellationToken cancellationToken)
6769 private void IdentifyOldManAudio ( )
6870 {
6971
70- var oldManPath = Path . Combine ( _HostEnvironment . ContentRootPath , "wwwroot" , "contents" , "oldman" ) ;
72+ var oldManPath = Path . Combine ( _HostEnvironment . WebRootPath , "contents" , "oldman" ) ;
7173 var di = new DirectoryInfo ( oldManPath ) ;
7274
7375 if ( di . Exists && di . GetFiles ( ) . Any ( ) ) {
0 commit comments