From what I've seen in the Video model, I guess I have to create a
Video object, rename the file according to the video id and move it to
the tmp folder (this is done by the ftp upoload), set the Video
object's filename property and then call the
finish_processing_and_queue_encodings method:
v = Video.create_empty
v.filename = v.key + ".mp4"
v.read_metadata
v.status = "original"
v.save
v.finish_processing_and_queue_encodings
Is this correct or do I have to keep something else in mind?
Best
Chris
Damien Tanner - Co-Founder and Director, Panda +44 (0)20 7099 7486 - pandastream.com - @pandastream |
--
You received this message because you are subscribed to the Google Groups "Panda" group.
To post to this group, send email to panda...@googlegroups.com.
To unsubscribe from this group, send email to pandastream...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/pandastream?hl=en.
thanks for the invite, I'll take a look as soon as I got some time to
spare...
I've found a considerably easier way to smuggle my files into the
system: I added a new method that tricks the upload method into doing
the dirty work for me:
def retrieve_from_ftp
filename = params[:filename]
path = Panda::Config[:ftp_tmp_path]
params[:file] = {
:filename => filename,
:tempfile => File.new(path + filename)
}
upload
end
Seems to work fine.
Kind Regards,
Chris
Chris