@@ -239,7 +239,7 @@ struct ConfigOld {
239
239
}
240
240
241
241
#[ derive( Serialize , Deserialize ) ]
242
- #[ serde( rename_all = "camelCase" ) ]
242
+ #[ serde( rename_all = "camelCase" , default ) ]
243
243
struct ObsOld {
244
244
ip : String ,
245
245
password : String ,
@@ -265,7 +265,7 @@ struct RtmpOld {
265
265
}
266
266
267
267
#[ derive( Serialize , Deserialize ) ]
268
- #[ serde( rename_all = "camelCase" ) ]
268
+ #[ serde( rename_all = "camelCase" , default ) ]
269
269
struct TwitchChat {
270
270
channel : String ,
271
271
enable : bool ,
@@ -419,6 +419,51 @@ impl From<RtmpOld> for stream_servers::StreamServer {
419
419
}
420
420
}
421
421
422
+ impl Default for ObsOld {
423
+ fn default ( ) -> Self {
424
+ Self {
425
+ ip : "localhost" . to_string ( ) ,
426
+ password : "password" . to_string ( ) ,
427
+ normal_scene : "live" . to_string ( ) ,
428
+ low_bitrate_scene : "low" . to_string ( ) ,
429
+ offline_scene : "offline" . to_string ( ) ,
430
+ refresh_scene : "refresh" . to_string ( ) ,
431
+ low_bitrate_trigger : 800 ,
432
+ high_rtt_trigger : Some ( 2500 ) ,
433
+ refresh_scene_interval : 10 ,
434
+ only_switch_when_streaming : true ,
435
+ }
436
+ }
437
+ }
438
+
439
+ impl Default for TwitchChat {
440
+ fn default ( ) -> Self {
441
+ Self {
442
+ channel : "715209" . to_string ( ) ,
443
+ enable : true ,
444
+ prefix : "!" . to_string ( ) ,
445
+ enable_public_commands : true ,
446
+ public_commands : vec ! [ "bitrate" . to_string( ) ] ,
447
+ enable_mod_commands : true ,
448
+ mod_commands : vec ! [
449
+ "refresh" . to_string( ) ,
450
+ "fix" . to_string( ) ,
451
+ "trigger" . to_string( ) ,
452
+ "sourceinfo" . to_string( ) ,
453
+ "obsinfo" . to_string( ) ,
454
+ ] ,
455
+ enable_auto_switch_notification : true ,
456
+ enable_auto_stop_stream_on_host_or_raid : true ,
457
+ admin_users : vec ! [ "715209" . to_string( ) , "b3ck" . to_string( ) ] ,
458
+ alias : Some ( vec ! [
459
+ vec![ "r" . to_string( ) , "refresh" . to_string( ) ] ,
460
+ vec![ "f" . to_string( ) , "fix" . to_string( ) ] ,
461
+ vec![ "b" . to_string( ) , "bitrate" . to_string( ) ] ,
462
+ ] ) ,
463
+ }
464
+ }
465
+ }
466
+
422
467
fn update_command (
423
468
config : & mut HashMap < chat:: Command , CommandInfo > ,
424
469
command : String ,
0 commit comments