lib/m3uzi.rb in m3uzi-0.5.0 vs lib/m3uzi.rb in m3uzi-0.5.1
- old
+ new
@@ -76,13 +76,13 @@
reset_byterange_history
check_version_restrictions
io_stream << "#EXTM3U\n"
io_stream << "#EXT-X-VERSION:#{@version.to_i}\n" if @version > 1
- io_stream << "#EXT-X-MEDIA-SEQUENCE:#{@initial_media_sequence+@removed_file_count}\n" if @playlist_type == :live
io_stream << "#EXT-X-PLAYLIST-TYPE:#{@playlist_type.to_s.upcase}\n" if [:event,:vod].include?(@playlist_type)
if items(File).length > 0
+ io_stream << "#EXT-X-MEDIA-SEQUENCE:#{@initial_media_sequence+@removed_file_count}\n" if @playlist_type == :live
max_duration = valid_items(File).map { |f| f.duration.to_f }.max || 10.0
io_stream << "#EXT-X-TARGETDURATION:#{max_duration.ceil}\n"
end
@header_tags.each do |item|