dev_video
cxt 5 years ago
parent 92795e0573
commit f1f0658e53

@ -45,7 +45,11 @@ namespace :video do
task :get_play_url => :environment do
Video.all.each do |video|
result = AliyunVod::Service.get_play_info(video.uuid)
if video.uuid.present?
end
result = AliyunVod::Service.get_play_info(video.uuid) rescue nil
if result.present? && result["PlayInfoList"]["PlayInfo"].present?
puts result
play_url = result["PlayInfoList"]["PlayInfo"].first["PlayURL"]
puts play_url
@ -55,3 +59,4 @@ namespace :video do
end
end
end
end
Loading…
Cancel
Save