Warn/show alert when state is not active
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
8de69d7c40
commit
c5db9d1f88
|
@ -37,12 +37,12 @@
|
|||
"Author": "Meow.tf",
|
||||
"Category": "OBS Replay",
|
||||
"CodePathWin": "replay.exe",
|
||||
"Description": "Control OBS' Replays using StreamDeck.",
|
||||
"Description": "Control OBS' Replays using StreamDeck and obs-websocket",
|
||||
"Name": "OBS Replay",
|
||||
"Icon": "images/pluginIcon",
|
||||
"CategoryIcon": "images/pluginIcon",
|
||||
"URL": "https://streamdeck.meow.tf/obsreplay",
|
||||
"Version": "1.0.0",
|
||||
"Version": "1.0.1",
|
||||
"SDKVersion": 2,
|
||||
"OS": [
|
||||
{
|
||||
|
|
|
@ -52,6 +52,15 @@ func replaySave(action, context string, payload *fastjson.Value, deviceId string
|
|||
return
|
||||
}
|
||||
|
||||
stateMutex.RLock()
|
||||
state, exists := cachedStates[context]
|
||||
stateMutex.RUnlock()
|
||||
|
||||
if exists && state == 0 {
|
||||
sdk.ShowAlert(context)
|
||||
return
|
||||
}
|
||||
|
||||
req := obsws.NewSaveReplayBufferRequest()
|
||||
|
||||
if err := req.Send(c); err != nil {
|
||||
|
|
Loading…
Reference in New Issue