Skip to content

Commit 66c907a

Browse files
committed
removed Mixer
1 parent ca855d3 commit 66c907a

File tree

3 files changed

+12
-163
lines changed

3 files changed

+12
-163
lines changed

Fritz.StreamTools/Services/MixerService.cs

Lines changed: 0 additions & 153 deletions
This file was deleted.

Fritz.StreamTools/StartupServices/ConfigureServices.cs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ private static void RegisterGitHubServices(IServiceCollection services, IConfigu
105105

106106
services.AddSingleton<ScreenshotTrainingService>();
107107
services.AddHostedService<ScreenshotTrainingService>(s => s.GetRequiredService<ScreenshotTrainingService>());
108-
services.AddTransient<HatDescriptionRepository>();
108+
109109
}
110110

111111
private static void AddStreamingServices(this IServiceCollection services, IConfiguration configuration)
@@ -117,9 +117,12 @@ private static void AddStreamingServices(this IServiceCollection services, IConf
117117
services.AddStreamService<TwitchService>(configuration,
118118
(c, l) => new TwitchService(c, l, provider.GetService<Fritz.Twitch.Proxy>(), provider.GetService<Fritz.Twitch.ChatClient>()),
119119
c => string.IsNullOrEmpty(c["StreamServices:Twitch:ClientId"])); // Test to disable
120-
services.AddStreamService(configuration,
121-
(c, l) => new MixerService(c, l), // Factory
122-
c => string.IsNullOrEmpty(c["StreamServices:Mixer:Channel"])); // Test to disable
120+
121+
// Removed Mixer service
122+
//services.AddStreamService(configuration,
123+
// (c, l) => new MixerService(c, l), // Factory
124+
// c => string.IsNullOrEmpty(c["StreamServices:Mixer:Channel"])); // Test to disable
125+
123126
services.AddStreamService(configuration,
124127
(c, l) => new FakeService(c, l), // Factory
125128
c => !bool.TryParse(c["StreamServices:Fake:Enabled"], out var enabled) || !enabled); // Test to disable

Test/Startup/ConfigureServicesTests.cs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -101,19 +101,18 @@ public static IEnumerable<object[]> Configurations
101101
{
102102
get
103103
{
104-
yield return new object[]{ MakeFakeConfiguration("123456", "654321", true), new [] { typeof(TwitchService), typeof(MixerService), typeof(FakeService) } };
105-
yield return new object[]{ MakeFakeConfiguration("", "654321", true), new [] { typeof(MixerService), typeof(FakeService) } };
106-
yield return new object[]{ MakeFakeConfiguration("", "", true), new [] { typeof(FakeService) } };
107-
yield return new object[]{ MakeFakeConfiguration("123456", "654321", false), new [] { typeof(TwitchService), typeof(MixerService) } };
104+
yield return new object[] { MakeFakeConfiguration("123456", true), new[] { typeof(TwitchService), typeof(FakeService) } };
105+
yield return new object[] { MakeFakeConfiguration("", true), new[] { typeof(FakeService) } };
106+
yield return new object[] { MakeFakeConfiguration("123456", false), new[] { typeof(TwitchService) } };
108107
}
109108
}
110109

111-
private static Dictionary<string, string> MakeFakeConfiguration(string twitchClientId, string mixerClientId, bool enableFake)
110+
private static Dictionary<string, string> MakeFakeConfiguration(string twitchClientId, bool enableFake)
112111
{
113112
return new Dictionary<string, string>
114113
{
115114
{"StreamServices:Twitch:ClientId", twitchClientId},
116-
{"StreamServices:Mixer:Channel", mixerClientId},
115+
//{"StreamServices:Mixer:Channel", mixerClientId},
117116
{"StreamServices:Fake:Enabled", enableFake.ToString()},
118117
{"FritzBot:ServerUrl", "http://localhost:80" },
119118
{"AzureServices:HatDetection:ProjectId", Guid.NewGuid().ToString() }

0 commit comments

Comments
 (0)