In my configuration, if i upload a file to be converted that already exists (either upload the same movie twice or upload two different movies of the same name), it will never convert (actually) but it will publish the node (i.e. it must think it got a "successful conversion"). I always see the "video not yet available" image.

Upload.module should usually rename files _0, etc--but it doesn't seem to do that in the 'originals' folder. Then it tries to convert/overwrite the file that's already there, can't... and just kinda craps out.

Comments

chrisfromredfin’s picture

So this seems to be caused because you're moving the file out of the files/ folder (makes sense), but then upload.module has no chance to rename the file. I propose just appending the $file->fid to the filename in flashvideo_convert:

$newfile->filename = basename($file->filepath, "." . $extension).'_'.$file->fid;

Note the update: I had some really stupid code in there before. Need to append the file->fid AFTER the basename call.

travist’s picture

cwells,

I can't tell you how much I apreciate you. It is such a releif to be a developer of this module to have someone try to come up with solutions and present them to me. The norm these days seems to only be people expecting me to fix issues within a couple of days and they get upset when they don't see progress (as if they think this is my full time job, and I am constantly at their disposal).

I really wish people would start doing what you do, where they actually spend some of their own time to get to the bottom of it. You really are a breath of fresh air.

Needless to say, I will be adding this to the code very shortly and submit it for the next version.

Thanks again for your efforts.

Travis.