Skip to content

Commit 3b3c971

Browse files
committed
Grab the current scene from OBS for sleep notifier
Closes #227
1 parent 7f6d79f commit 3b3c971

3 files changed

Lines changed: 11 additions & 7 deletions

File tree

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "noalbs"
3-
version = "2.19.0"
3+
version = "2.19.1"
44
authors = ["Brian Spit <brian@715209.net>"]
55
edition = "2024"
66

src/switcher.rs

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,15 @@ impl Switcher {
7979
return Some(state.broadcasting_software.start_streaming_notifier());
8080
}
8181

82-
if !state
83-
.switcher_state
84-
.switchable_scenes
85-
.contains(&state.broadcasting_software.current_scene)
86-
{
82+
if !state.switcher_state.switchable_scenes.contains(
83+
&state
84+
.broadcasting_software
85+
.connection
86+
.as_ref()?
87+
.current_scene()
88+
.await
89+
.ok()?,
90+
) {
8791
info!("Not able to switch, waiting for scene switch to a switchable scene");
8892
return Some(state.broadcasting_software.switch_scene_notifier());
8993
}

0 commit comments

Comments
 (0)