lib/freshlive.rb in rget-3.2.3 vs lib/freshlive.rb in rget-4.0.0

- old
+ new

@@ -7,15 +7,15 @@ super @archive = URI(File.join(@url + '/archive')) @doc = Nokogiri(open(@archive).read).root end - def download(name) + def download offset = 0 begin meta = program_meta(program_id(offset)) serial = meta['data']['title'].scan(/\d+$/).first.to_i - open("#{name}##{'%02d' % serial}.ts", 'wb') do |w| + open("#{@label}##{'%02d' % serial}.ts", 'wb') do |w| ts_list(meta['data']['archiveStreamUrl']).each do |u| w.write(open(u, 'rb').read) end end rescue OpenURI::HTTPError