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)