Is this normal?

Shouldn't the re-queued job or convert on save for the second time simply overwrite the first transcoded file? It's nice that the HTML builds with the latest result among all the unique IDs, but I'm not sure why you would want to save the older files.

Also, Convert video on save should probably delete "flv format" and replace it with something like "selected formats."

#2 video-clean-convertet-on-reconvert-1468594-2.patch1.5 KBosopolar
PASSED: [[SimpleTest]]: [MySQL] 224 pass(es). View
Members fund testing for the Drupal project. Drupal Association Learn more


Jorrit’s picture

I have no idea as well. It is a decision made by a prior programmer. I'll look into it after 2.4.

osopolar’s picture

Title: Re-conversion and Re-queue video create additional files » Delete old converted files after re-conversion.
Category: support » bug
Status: Active » Needs review
1.5 KB
PASSED: [[SimpleTest]]: [MySQL] 224 pass(es). View

The old transcoded files won't get deleted, but they are removed from the files tables (file_managed, file_usage) and from video_output table.

I personally prefer delete the old files and add the new ones instead of replacing them.

In the function Transcoder::cleanConverted() calls db_delete() for the fields of these tables. IMHO it would be better to call
file_usage_delete() followed by a
file_delete() call.

Patch attached.

Jorrit’s picture

Status: Needs review » Fixed

I have committed your patch with three changes:

1) The last db_delete() statement should use 'original_fid', not 'output_fid'.
2) Indentation of the lines should be 2 spaces, not 4.
3) If $output_files is empty, bail out.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.