From b7ea7567899869818a1732f892016b7ab9c466d0 Mon Sep 17 00:00:00 2001 From: saurabhbhatia Date: Fri, 4 Oct 2013 20:04:44 +0800 Subject: [PATCH] Updated channel videos liks to 3gp format --- .../panel/video/back_end/channel_videos_controller.rb | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/vendor/built_in_modules/video/app/controllers/panel/video/back_end/channel_videos_controller.rb b/vendor/built_in_modules/video/app/controllers/panel/video/back_end/channel_videos_controller.rb index 681ce13d4..d299975ca 100644 --- a/vendor/built_in_modules/video/app/controllers/panel/video/back_end/channel_videos_controller.rb +++ b/vendor/built_in_modules/video/app/controllers/panel/video/back_end/channel_videos_controller.rb @@ -81,13 +81,18 @@ class Panel::Video::BackEnd::ChannelVideosController < OrbitBackendController @client_videos.videos.each do |video| - url = video.player_url + # url = video.player_url title = video.title description = video.description author = video.author.name channel_name = channel.channel_name + video.media_content.each do |m| + if m.mime_type == "video/3gpp" + @url = m.url + end + end # category_id = category.id.to_s - @data << { title: title, description: description, url: url, author: author, channel_name: channel_name} + @data << { title: title, description: description, url: @url, author: author, channel_name: channel_name} end render :json => JSON.pretty_generate(@data)