Ticket #448 (closed defect: ready_for_review)

Opened 2 years ago

Last modified 2 years ago

[workflow] node edit & upload another video

Reported by: peter Owned by: Robert
Priority: major Milestone: WLE modules into D6
Component: WLE Version:
Keywords: Cc:
MoSCoW: Should Have Estimated time after impact analysis:
Related to project: none Tested: no
Accepted: no Estimated Hours: 0

Description (last modified by robert) (diff)

Current situation: user uploads another video at a existing node. The asset & mediafiles are removed in MediaMosa and a new asset & mediafiles are created.

Problem: This gives problems for updating ACL rules (#409) because of changing mediafile id's. The same will be true for metadata (#417, #418).

Desired situation: When uploading another movie the asset should be emptied.

  • 1) All mediafiles, including still should be removed from the asset.
  • 2) The user should be informed in the interface about the behavior.
  • 3) The checkbox "Delete the Video" should also result in an empty asset.
  • 4) The position of the checkbox should be in the fieldset "Attach a media file to upload MediaMosa".

Change History

Changed 2 years ago by peter

  • owner set to Robert
  • status changed from new to assigned

Changed 2 years ago by robert

  • description modified (diff)

My notes on implementation of this ticket;

  • You can not use /asset/delete here. Because you delete the asset, and the problem is that we remove the asset while the node is still active. Also deleting the asset will remove the metadata.
  • Use /asset/$asset_id/mediafile call to get the asset mediafiles and figure out the mediafiles that are under the asset. Remember you have to delete the still(s) as well, these are found with this rest call to using the 'is_still' parameter.
  • Delete the mediafile with /mediafile/$mediafile_id/delete and use parameter 'delete' with value 'cascade'. Could be that if you try to delete a mediafile and its already deleted, it will give back a failure. Then ignore the failure; the mediafile is gone anyway. Remember you need to provide the owner of the mediafile you want to delete.
  • You need to do this in 2 fases;
    • Delete all mediafiles (is_still=false) with delete 'cascade' (delete mediafiles and its children stills)
    • Then get the mediafiles again with stills (is_still=true) and delete any left over stills.

Changed 2 years ago by peter

  • owner changed from Robert to t1mm1

Changed 2 years ago by peter

  • owner changed from t1mm1 to Robert

Changed 2 years ago by forgacs

I have changed the embedded field. Now it stores asset_id, instead of mediafile_id.
I have fixed node/$nid/edit problem. It uses the original asset_id without creating a new one.
After uploading a new video, the application deletes the old mediafiles (with still images). If there weren't upload, then it deletes the newly created empty mediafile.

@Robert: Please, review it.

Changed 2 years ago by forgacs

  • status changed from assigned to closed
  • resolution set to ready_for_review
Note: See TracTickets for help on using tickets.