mirror of
https://github.com/onyx-and-iris/voicemeeter-rb.git
synced 2024-12-04 15:40:49 +00:00
fixes bug reading config file
upd Gemfile
This commit is contained in:
parent
59cda8aca6
commit
c4fb560e8c
@ -2,4 +2,4 @@
|
|||||||
|
|
||||||
source "https://rubygems.org"
|
source "https://rubygems.org"
|
||||||
|
|
||||||
gem "obsws", "~> 0.5.8"
|
gem "obsws", "~> 0.6.2"
|
||||||
|
@ -8,7 +8,7 @@ class Main
|
|||||||
@vm = vm
|
@vm = vm
|
||||||
@obsws = OBSWS::Events::Client.new(**kwargs)
|
@obsws = OBSWS::Events::Client.new(**kwargs)
|
||||||
|
|
||||||
@obsws.on :on_current_program_scene_changed do |data|
|
@obsws.on :current_program_scene_changed do |data|
|
||||||
scene = data.scene_name
|
scene = data.scene_name
|
||||||
puts "Switched to scene #{scene}"
|
puts "Switched to scene #{scene}"
|
||||||
if respond_to?("on_#{scene.downcase}")
|
if respond_to?("on_#{scene.downcase}")
|
||||||
@ -16,7 +16,7 @@ class Main
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@obsws.on :on_exit_started do |data|
|
@obsws.on :exit_started do |data|
|
||||||
puts "OBS closing!"
|
puts "OBS closing!"
|
||||||
@obsws.close
|
@obsws.close
|
||||||
@running = false
|
@running = false
|
||||||
@ -54,7 +54,8 @@ class Main
|
|||||||
end
|
end
|
||||||
|
|
||||||
def conn_from_yml
|
def conn_from_yml
|
||||||
YAML.load_file("config.yaml", symbolize_names: true)[:connection]
|
pn = Pathname.new(__dir__).join("config.yaml")
|
||||||
|
YAML.load_file(pn, symbolize_names: true)[:connection]
|
||||||
end
|
end
|
||||||
|
|
||||||
if $PROGRAM_NAME == __FILE__
|
if $PROGRAM_NAME == __FILE__
|
||||||
|
Loading…
Reference in New Issue
Block a user