mirror of
https://github.com/onyx-and-iris/voicemeeter-rb.git
synced 2024-11-15 15:00:46 +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"
|
||||
|
||||
gem "obsws", "~> 0.5.8"
|
||||
gem "obsws", "~> 0.6.2"
|
||||
|
@ -8,7 +8,7 @@ class Main
|
||||
@vm = vm
|
||||
@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
|
||||
puts "Switched to scene #{scene}"
|
||||
if respond_to?("on_#{scene.downcase}")
|
||||
@ -16,7 +16,7 @@ class Main
|
||||
end
|
||||
end
|
||||
|
||||
@obsws.on :on_exit_started do |data|
|
||||
@obsws.on :exit_started do |data|
|
||||
puts "OBS closing!"
|
||||
@obsws.close
|
||||
@running = false
|
||||
@ -54,7 +54,8 @@ class Main
|
||||
end
|
||||
|
||||
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
|
||||
|
||||
if $PROGRAM_NAME == __FILE__
|
||||
|
Loading…
Reference in New Issue
Block a user