awslive-inputlooper 0.1.6 → 0.1.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: 4dda3bdbcce7f7c80fc22ef21ba6c4363a4db351b4d3f3a22b46e3537f10c9a8
4
- data.tar.gz: 90d5fbae60bc494ab335a28cf639a4094f7024c9d5ebfc52616d6a8241c56cfb
3
+ metadata.gz: 4182cdb12985e326a786ee90c23bcd60142032b0eb742a5eda21c796cb587228
4
+ data.tar.gz: 198c007a0530bb47712e62ed8fe1f8a81713cd3a88a6fe5999b2db1d1cf02549
5
5
  SHA512:
6
- metadata.gz: c8480ab5a12f36e81e49cce273d496db15d0fe286cbe8b441cc51c9815ceaa38639b35badaa16c204ca2603349b1df476d70dd8f432ecb69aa668ea068d815b1
7
- data.tar.gz: 2dec65673b80a4262edfe3394b433013a4800355fe40d089bf801c9e4c97297c06e35c4851f7af6a46ff0c09c0d02c511a4cd2b4e67a3a687255fa2184bf0da0
6
+ metadata.gz: 9a8bc68436cecd8c143199d2d8c61f084336b06de6428b2e29521b05261d687f743e292abb52943ea1077c57bc1587378c65a684c3cf5da28bba67a9690a2c12
7
+ data.tar.gz: '09b3d0dbb3b6d9ab81df8fbb6c74c96a1b142e880c46b6a26be7914e1998032e15e6f0f3e5d8e605a452dd38232e60f6b050ec61d56562cfa377a67c326c2d4f'
@@ -73,7 +73,7 @@ module Awslive
73
73
  return playlist_loop_alive
74
74
  end
75
75
 
76
- def switch_input(force_immed = nil)
76
+ def switch_input(force_immed = nil, exclude_query_param = nil)
77
77
  # Fetching the channel information every time to know the state of the channel and input in pipeline.
78
78
  channel_info = get_channel_info
79
79
  channel_state = channel_info[:state]
@@ -107,7 +107,7 @@ module Awslive
107
107
  unless follow_schedule.nil?
108
108
  follow_url = @scheduler.get_follow_action_url(@channel_id, current_input_action_name)
109
109
  log("Follow URL #{follow_url}")
110
- next_file = identify_next_input(current_url)
110
+ next_file = identify_next_input(current_url, exclude_query_param)
111
111
  log( "Next URL #{next_file}")
112
112
  if !follow_url[0].nil? && next_file != follow_url[0]
113
113
  log( "Playlist seems to be changed, hence aligning.")
@@ -125,7 +125,7 @@ module Awslive
125
125
  end
126
126
  else
127
127
  log("No follow Schedule!")
128
- next_file = identify_next_input(current_url)
128
+ next_file = identify_next_input(current_url, exclude_query_param)
129
129
  unless next_file.nil?
130
130
  next_input_name = dynamic_input[:input_attachment_name]
131
131
  log( "Next input Name #{next_input_name} #{next_file}")
@@ -142,12 +142,16 @@ module Awslive
142
142
  end
143
143
  end
144
144
 
145
- def identify_next_input(file_url)
145
+ def identify_next_input(file_url, exclude_query_param)
146
146
  next_file = @playlist[0]
147
147
  #puts " File Url #{file_url}"
148
148
  if !file_url.nil? && !file_url[0].nil?
149
149
  @playlist.each_with_index do | playlist_file, index |
150
150
  #puts "next file identification #{playlist_file} #{file_url[0]} #{index}"
151
+ if !exclude_query_param.nil?
152
+ playlist_file = playlist_file.split('?')[0]
153
+ file_url[0] = file_url[0].split('?')[0]
154
+ end
151
155
  if playlist_file == file_url[0]
152
156
  if index == (@playlist.length - 1)
153
157
  next_file = @playlist[0]
@@ -219,13 +223,13 @@ module Awslive
219
223
 
220
224
  def start_channel
221
225
  res = @medialiveclient.start_channel({ :channel_id => "#{@channel_id}" })
222
- puts "Start Channel Rsponse #{res}"
226
+ puts "Start Channel Response #{res}"
223
227
  res
224
228
  end
225
229
 
226
230
  def stop_channel
227
231
  res = @medialiveclient.stop_channel({ :channel_id => "#{@channel_id}" })
228
- puts "Stop Channel Rsponse #{res}"
232
+ puts "Stop Channel Response #{res}"
229
233
  res
230
234
  end
231
235
 
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.1.6
4
+ version: 0.1.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-02-17 00:00:00.000000000 Z
11
+ date: 2020-02-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler