Skip to content

Commit

Permalink
Add check for captions.content before appending file to captions list
Browse files Browse the repository at this point in the history
  • Loading branch information
masaball committed Dec 5, 2023
1 parent 2f69afe commit da879f8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/views/master_files/hls_manifest.m3u8.erb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ Unless required by applicable law or agreed to in writing, software distributed
%>
#EXTM3U
<% if @master_file.has_captions? %>
<% @master_file.supplemental_file_captions.append(@master_file.captions).each_with_index do |caption, index| %>
<% captions_list = @master_file.supplemental_file_captions %>
<% captions_list.append(@master_file.captions) if @master_file.captions.content %>
<% captions_list.each_with_index do |caption, index| %>
<% label = caption.is_a?(SupplementalFile) ? caption.label : 'English' %>
<% language = caption.is_a?(SupplementalFile) ? caption.language : 'en' %>
<% id = caption.is_a?(SupplementalFile) ? caption.id : 'master_file_caption' %>
Expand Down

0 comments on commit da879f8

Please sign in to comment.