summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/obswebsocket.cr20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/obswebsocket.cr b/src/obswebsocket.cr
index e4a1509..5f19008 100644
--- a/src/obswebsocket.cr
+++ b/src/obswebsocket.cr
@@ -351,13 +351,21 @@ module OBS
raise SourceMissingException.new( "SourceFilterEnableStateChanged: missing source #{ edata["sourceName"].as_s}" )
end
when "SourceFilterListReindexed"
- # FIXME
+ edata = d["eventData"]
+ self.sources[edata["sourceName"].as_s].filters.deletecache()
+ # This could probably be made more efficient using the eventData
when "SourceFilterCreated"
- # FIXME
+ edata = d["eventData"]
+ self.sources[edata["sourceName"].as_s].filters.deletecache()
+ # This could probably be made more efficient using the eventData
when "SourceFilterRemoved"
- # FIXME
+ edata = d["eventData"]
+ self.sources[edata["sourceName"].as_s].filters.deletecache()
+ # This could probably be made more efficient using the eventData
when "SourceFilterNameChanged"
- # FIXME
+ edata = d["eventData"]
+ self.sources[edata["sourceName"].as_s].filters.deletecache()
+ # This could probably be made more efficient using the eventData
when "StreamStateChanged"
when "RecordStateChanged"
when "ReplayBufferStateChanged"
@@ -1058,6 +1066,10 @@ module OBS
@filters_by_name.empty? && populate
@filters_by_name
end
+ def deletecache()
+ @filters_by_name = Hash( String, OBS::SourceFilter ).new
+ @filters_by_index = Array( String ).new
+ end
end
class SourceFilter