Skip to content

Commit

Permalink
trying new video profile
Browse files Browse the repository at this point in the history
  • Loading branch information
tehviking committed Sep 16, 2010
1 parent 5566b1b commit 1fc513c
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions app/controllers/videos_controller.rb
Expand Up @@ -2,16 +2,24 @@ class VideosController < ApplicationController
def show
@video = Video.find(params[:id])
@original_video = @video.panda_video
@h264_encoding = @original_video.encodings.find_by_profile_name("h264")
@h264_encoding = @original_video.encodings.find_by_profile_name("h264noresize")
end

def new
@video = Video.new
profile = Panda::Profile.create(:preset_name => "60sec")
profile = Panda::Profile.create()
end

def create
@video = Video.create!(params[:video])
redirect_to :action => :show, :id => @video.id
end

def destroy
@video = Video.find(params[:id])
panda_video = Panda::Video.find(@video.panda_video_id)
panda_video.delete
@video.destroy
redirect_to :videos_path
end
end

0 comments on commit 1fc513c

Please sign in to comment.