Output config when starting
This commit is contained in:
parent
a5afc3f536
commit
939b8c71a2
@ -18,4 +18,13 @@ public struct Config
|
|||||||
public Config()
|
public Config()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override string ToString()
|
||||||
|
{
|
||||||
|
return
|
||||||
|
$"Websocket-Url='{ObsWebsocketUrl}\n" +
|
||||||
|
$"Websocket-Password='{new string(ObsWebsocketPassword.Substring(Math.Min(3, ObsWebsocketPassword.Length)).Concat(new string('*', Math.Max(3, ObsWebsocketPassword.Length)+6)).ToArray())}'\n" +
|
||||||
|
$"Enabled Scenes={{{string.Join(',', EnabledScenes)}}}\n" +
|
||||||
|
$"Blur Programs={{{string.Join(',', BlurPrograms)}}}";
|
||||||
|
}
|
||||||
}
|
}
|
@ -13,6 +13,7 @@ Config config = File.Exists(configFilePath) switch
|
|||||||
_ => new Config()
|
_ => new Config()
|
||||||
};
|
};
|
||||||
File.WriteAllText(configFilePath, JsonConvert.SerializeObject(config));
|
File.WriteAllText(configFilePath, JsonConvert.SerializeObject(config));
|
||||||
|
logger.LogInformation($"Config\n{config}");
|
||||||
Blur _ = new (config.ObsWebsocketUrl, config.ObsWebsocketPassword, config.EnabledScenes, config.BlurPrograms, logger);
|
Blur _ = new (config.ObsWebsocketUrl, config.ObsWebsocketPassword, config.EnabledScenes, config.BlurPrograms, logger);
|
||||||
|
|
||||||
while (true)
|
while (true)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user