<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>db/migrate/003_new_panda_api.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -22,7 +22,7 @@ class VideosController &lt; ApplicationController
   
   def upload
     @video = Video.find(params[:id])
-    @upload_form_url = %(http://upload.pandastream.com/videos/#{@video.panda_id}/form)
+    @upload_form_url = %(http://#{Panda.api_domain}:#{Panda.api_port}/videos/#{@video.panda_id}/form)
   end
   
   def status</diff>
      <filename>app/controllers/videos_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,21 +1,32 @@
 class Video &lt; ActiveRecord::Base
   def embed_html
-    %(&lt;embed src=&quot;http://videos.pandastream.com/flvplayer.swf&quot; width=&quot;#{self.width}&quot; height=&quot;#{self.height}&quot; allowfullscreen=&quot;true&quot; allowscriptaccess=&quot;always&quot; flashvars=&quot;&amp;displayheight=#{self.height}&amp;file=#{self.video_url}&amp;width=#{self.width}&amp;height=#{self.height}&quot; /&gt;)
+    %(&lt;embed src=&quot;http://videos.pandastream.com/flvplayer.swf&quot; width=&quot;#{self.width}&quot; height=&quot;#{self.height}&quot; allowfullscreen=&quot;true&quot; allowscriptaccess=&quot;always&quot; flashvars=&quot;&amp;displayheight=#{self.height}&amp;file=#{self.url}&amp;image=#{self.screenshot_url}&amp;width=#{self.width}&amp;height=#{self.height}&quot; /&gt;)
+  end
+  
+  def url
+    &quot;http://#{VIDEOS_DOMAIN}/#{self.filename}&quot;
+  end
+  
+  def screenshot_url
+    &quot;http://#{VIDEOS_DOMAIN}/#{self.screenshot}&quot;
+  end
+  
+  def thumbnail_url
+    &quot;http://#{VIDEOS_DOMAIN}/#{self.thumbnail}&quot;
   end
   
   def update_panda_status(panda_video)
-    # If the video has been encoded, save the url of the standard quality flash video which users will watch
-    if panda_video.status == 'done'
-      if encoding = panda_video.encodings.find { |e| 
-          e[:format] == 'flv' and \
-          e[:quality] == 'sd' and \
-          e[:status] == 'success'
-        }
-        self.video_url = encoding[:filename]
-        self.width = encoding[:width]
-        self.height = encoding[:height]
-        save
-      end
+    if encoding = panda_video.encodings.find { |e| 
+        e.profile_title == &quot;MP4 SD&quot; and e.status == 'success'
+      }
+      self.filename = encoding.filename
+      self.original_filename = encoding.original_filename
+      self.screenshot = encoding.screenshot
+      self.thumbnail = encoding.thumbnail
+      self.duration = encoding.duration
+      self.width = encoding.width
+      self.height = encoding.height
+      save
     end
   end
 end
\ No newline at end of file</diff>
      <filename>app/models/video.rb</filename>
    </modified>
    <modified>
      <diff>@@ -61,4 +61,7 @@ end
 # Include your application configuration below
 # require 'panda'
 require 'panda_new'
-Panda.account_key = &quot;5ff26a80-15e8-012b-b412-404043cf913d&quot;
\ No newline at end of file
+Panda.account_key = &quot;f9e69730-16fd-012b-731d-001ec2b5c0e1&quot;
+Panda.api_domain = &quot;localhost&quot;
+Panda.api_port = 4000
+VIDEOS_DOMAIN = &quot;videos.pandastream.com&quot;
\ No newline at end of file</diff>
      <filename>config/environment.rb</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>lib/panda_new.rb</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>16520b45b6f4633d07a9ab517e34f0a02d4f648f</id>
    </parent>
  </parents>
  <author>
    <name>Damien Tanner</name>
    <email>damien@new-bamboo.co.uk</email>
  </author>
  <url>http://github.com/newbamboo/panda_example_rails/commit/452cac6d4123731f8bf030d3a2d4f5468fce3cb6</url>
  <id>452cac6d4123731f8bf030d3a2d4f5468fce3cb6</id>
  <committed-date>2008-06-23T15:54:49-07:00</committed-date>
  <authored-date>2008-06-23T15:54:49-07:00</authored-date>
  <message>updated for new panda arch</message>
  <tree>035bc10a4590b08ca979980902c05c7eff370934</tree>
  <committer>
    <name>Damien Tanner</name>
    <email>damien@new-bamboo.co.uk</email>
  </committer>
</commit>
