Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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."
Comment | File | Size | Author |
---|---|---|---|
#2 | video-clean-convertet-on-reconvert-1468594-2.patch | 1.5 KB | osopolar |
Comments
Comment #1
Jorrit CreditAttribution: Jorrit commentedI have no idea as well. It is a decision made by a prior programmer. I'll look into it after 2.4.
Comment #2
osopolarThe 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 Transcoder.inc 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.
Comment #3
Jorrit CreditAttribution: Jorrit commentedI 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.