I am converting the file with FFMPEG and then using 'Replace existing file' when storing back to CCK...
It 'replaces' the file in CCK, but doesnt actually delete the source file... I was wondering if this is correct functionality. if so, when should you use that 'Process: delete source material' step, I tried it at the end of my configuration, and it didn't delete the source material.

Selected file Current file Step Status
26 260 ...../_unconverted/CIMG0330.MOV .../CIMG0330.flv Process: delete source material

CommentFileSizeAuthor
#14 config1.jpg408.09 KBarmyofda12mnkeys
#2 config.jpg379.7 KBarmyofda12mnkeys
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

arthurf’s picture

Status: Active » Needs review

It 'replaces' the file in CCK, but doesnt actually delete the source file...

This is intended functionality.

'Process: delete source material' step, I tried it at the end of my configuration, and it didn't delete the source material.

This should now work correctly. I had set it up previously where you could delete per step but that was starting to get overly complicated with form alters.

armyofda12mnkeys’s picture

FileSize
379.7 KB

It does work if I place it at the end...
The original source file is deleted...
It does however error for some reason...

Selected file Current file Step Status
sites/.../_unconverted/file1.MOV sites/.../file1.flv Process: delete source material error

If i place the step in the middle right after the FFMPEG conversion, the configuration will not move past that step because of the 'error'. Configuration is attached. No code errors popup on the page though (well... This one warning happens because of a TODO, but i just removed 2nd arg for now so doesnt warn and problem still occurs... That warning is: "warning: Missing argument 2 for mm_dir_store_delete(), called in on line 584 and defined in mm_dir.module on line 210.").

arthurf’s picture

I just committed a few changes:
* mm_utilities_delete_file_cruft() returns true so files will not go into an error condition when it finishes
* mm_utilities_delete_file_cruft() won't delete the most recent file in the configuration, but it will delete everything that it can behind it

I *think* that should fix it.

armyofda12mnkeys’s picture

hmmm it doesn't error anymore so all the steps go through...... but it now doesn't delete the source file :(.
Using same config as attached in previous post pic.

arthurf’s picture

Woops, stupid error on my part. Should be fixed now

armyofda12mnkeys’s picture

okay Ill take a look later. Sorry I didnt update but I think I also tested the Jan27 release and it went through all the steps, but reverted back to not deleting the src file. I'll reconfirm that tonight. Its almost there though

armyofda12mnkeys’s picture

Yep it errors:

Fatal error: Call to undefined method media_mover_step::parameter_get() in /home/mysite/mysite.us/sites/all/modules/media_mover/modules/mm_node/includes/mm_node.content.inc on line 70

Looks like it fails at the first step and doesn't report an error...
"Select: from a CCK field running"

arthurf’s picture

Yeah, that's a completely different error though and ironically I was just working on it now.

arthurf’s picture

Ok, so I fixed the issue with the step class, updated the overridden cck formaters, fixed the paths in mm_s3. I still need to figure out how to pass the s3 creds without relying on the hack to the files table.

You will need to clear your caches to ensure that the new formatters are picked up

armyofda12mnkeys’s picture

Quick Question after running new dev release:
I am not sure where to place Delete Source File step... I placed it in the middle of my above config and tried at the end, but I dont get the expected behavior of deleting the absolute original file (looks like might delete the file from previous step)... Is that alright to get rid of the 'src file' in the middle after the FFMPEG step.... or should it come at the end and still be able to delete the input file from first harvest step, or is the src file different when it gets to that stage, aka the src file is the file outputted from previous action so wouldn't make sense to add at end?

Anyway tried it in after FFMPEG step to delete the source file, and at end to no avail.

armyofda12mnkeys’s picture

Any update on above question?
I will try new release tonight to see if any new bugs.

armyofda12mnkeys’s picture

Just ran latest release same problem....
So maybe my problem is that the 'Store to CCK' step should replace the file and the 'Delete Process File' step afterwards is just trying to delete the source file fed into it which is not what I want (so hence I don't want to use the Delete step and should remove it, but the Store to CCK field should handle it).

Like should the 'Store to CCK' option 'Replace existing file ... WARNING: this is a destructive replacement! This will DELETE your source material.' overwrite just the CCK field data, or delete the actual source file too. Cause I think It should delete the src material, but it isnt, it is just overwriting cck data.

I think either you intended this option to ask the user to replace the cck data? If so, then another option should be added to really delete the src material. Or this option really should delete the src file, and might need to be fixed as doesnt delete for me.

The 'Process: delete source material' itself is worded confusingly. Its says it will "Delete the source material. WARNING: enabling this will remove original content forever." Then later says below the button: "This will delete all files created by this Media Mover configuration except for the original source file and the output file." So will it delete the src/original material or not as both sentences seem to contradict each other?

arthurf’s picture

The cck replace option will now delete the source material.

armyofda12mnkeys’s picture

FileSize
408.09 KB

Hey arthur,
Tried latest release today.
I have it checked and doesn't delete the src file still. config is attached. No biggie to me. Take a look if have a chance.

-Arian