awslive-inputlooper 0.2.6 → 0.2.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d9d5e1cccddf98cc55107733f14256f531af1aeff0bb6e50e2b183897dd69052
4
- data.tar.gz: 6540207814106773f683346f7425d84170e7bf46e07c4875270f87c2bf6b991d
3
+ metadata.gz: bbb56b46df9fd4e4c898ed6cbe4610eca7d7b50315c30b81cd54d35d2fe5af3f
4
+ data.tar.gz: 14fb0b1198c52dc640b1f388ff146d56d8a05f0f7e7019a8380c3f6849eb3aef
5
5
  SHA512:
6
- metadata.gz: 5357250243ae0a7b6c146e1351c604208b189f24ea9e9d07e317a1c504e4f0e4ddd227a9c89fea8b2f2e901c3abee2152bf0b84635c9cff05e8cec9c3e2c088b
7
- data.tar.gz: fe1748e93bdb22ca0f27191ae0392445df6ce416c78176d1ad7755fbb0c521ce5f7498f6346bfc842e3e6f4c94486225de27c707148b4f4bbb78abe41dc4931f
6
+ metadata.gz: c00e9e102ac04660d5f55bdd663bfebc7d557ca7dcaa1ea32bae25a40f6763285d8f8052c25da2b9f0dc9c780fb1d2e9a2f2b5f25c31d31a6b9e95b434004584
7
+ data.tar.gz: 40e5b7952d88f4650d5b03ce599467c72304994e0c0a3d6d81831f60bff2a49dcf8bf42ad5b12a06af8751d0640b97f288a3327596c23d53818e550d875a55e4
@@ -162,17 +162,35 @@ module Awslive
162
162
  action_type
163
163
  end
164
164
 
165
- def get_schedule_actions_by_type(channel_id, action_type)
165
+ def get_schedule_start_type(schedule_action)
166
+ start_type = nil
167
+ schedule_action[:schedule_action_start_settings].each_pair do | key, value |
168
+ if !value.nil?
169
+ start_type = key.to_s.sub!("_mode_schedule_action_start_settings","")
170
+ break
171
+ end
172
+ end
173
+ start_type
174
+ end
175
+
176
+ def get_schedule_actions(channel_id, action_type = nil, start_type = nil)
166
177
  sc_actions = []
167
178
  response = @mediaclient.describe_schedule({
168
179
  channel_id: "#{channel_id}", max_results: 100
169
180
  })
170
181
  loop do
171
182
  response[:schedule_actions].each do | schedule_action |
172
- current_action_type = get_schedule_action_type(schedule_action)
173
- if current_action_type == action_type
174
- sc_actions << schedule_action
183
+ if !action_type.nil?
184
+ current_action_type = get_schedule_action_type(schedule_action)
185
+ #puts "Action Type #{current_action_type} : #{action_type}"
186
+ next if current_action_type != action_type.to_s
187
+ end
188
+ if !start_type.nil?
189
+ current_start_type = get_schedule_start_type(schedule_action)
190
+ #puts "start Type #{current_start_type} : #{start_type}"
191
+ next if current_start_type.to_s != start_type.to_s
175
192
  end
193
+ sc_actions << schedule_action
176
194
  end
177
195
  break if response[:next_token].nil?
178
196
  response = @mediaclient.describe_schedule({channel_id: "#{channel_id}", max_results: 100, next_token: response[:next_token] } )
@@ -202,4 +220,4 @@ module Awslive
202
220
  @mediaclient.delete_schedule({ channel_id: channel_id })
203
221
  end
204
222
  end
205
- end
223
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: awslive-inputlooper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.6
4
+ version: 0.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maheshwaran G
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-06-26 00:00:00.000000000 Z
11
+ date: 2020-06-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler