From 731b72146e589b837f785f2eccc9eec36d63dfd0 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Tue, 10 Mar 2020 23:40:53 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=86=E9=A2=91=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/services/videos/batch_publish_service.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/services/videos/batch_publish_service.rb b/app/services/videos/batch_publish_service.rb index 19f611b3b..cad8cfbd9 100644 --- a/app/services/videos/batch_publish_service.rb +++ b/app/services/videos/batch_publish_service.rb @@ -30,7 +30,8 @@ class Videos::BatchPublishService < ApplicationService end # 标清转码为h264 - if AliyunVod::Service.get_meta_code_info(video.uuid).start_with?('h264', 'h265') + code_info = AliyunVod::Service.get_meta_code_info(video.uuid) + if code_info.present? && code_info.start_with?('h264', 'h265') video.transcoded = true #Rails.logger.info("####video.uuid:#{video.uuid}") #result = AliyunVod::Service.get_play_info(video.uuid)