update youtube video if node is updated

kepesv - April 20, 2009 - 13:46
Project:Video Upload
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Justin W Freeman
Status:needs review
Description

I've created a node with a video. The cron job uploaded it to YouTube correctly.
But... If I edit the node and change the video file (delete the existing and upload a new) or node title (=video title) youtube doesn't follow this changes because the module doesn't hit the cron to do it.
Are you plan to solve this problem?
Anyway I like this module, it's great work!! respect :)

#1

happydrupal - April 24, 2009 - 03:05

I saw this message after I tried to update the title/body of the successful uploaded video node.

Referencing to the file used in the Myvideofile field is not allowed.

But I can change the Video Title & Description of the successful uploaded video from Youtube, it didn't sync back to the title/body of the original video node.

It seems that there's no sync between the Video node of Drupal and Video in the Youtube. Looks like I have to check the setting very carefully and thoroughly!

Also, the video in the drupal files directory will not be erased after the successful upload, is this true?

#2

happydrupal - April 27, 2009 - 08:52

For updating the video node................

After checking the setting of the video field, I did set the following three to Synchronize (overwrite default)

1) Default Video Title Synchronization
2) Default Video Description Synchronization
3) Default Video Keyword Synchronization

However, I can not update the title/description of the video, nor delete the video node. Any clue??

Thanks in advance.

#3

happydrupal - April 30, 2009 - 07:07

Just curious....Does the Video Upload really support title/body field and video modify/update and sync between Drupal and Youtube after the video node had been created and original video uploaded to the Youtube???

Anyone has the answer?? Thanks again.

#4

jhedstrom - April 30, 2009 - 16:41

@happydrupal, this should all theoretically work, but I've never deployed this module to a site where the actual video file changes on a node. What would actually happen in this case is that the module would delete the old video from youtube, and upload the new one. Since this may be undesireable, I haven't spent a lot of time working on that functionality. Changes to the title and body are more straightforward and should work. I'll look into this the next chance I get to work on this module (or will gladly commit patches addressing this issue).

#5

happydrupal - May 1, 2009 - 23:08

dear jhedstrom, looking forward to your patch. Let me know if you want ot test the upload on my site, thanks.

#6

Justin W Freeman - October 22, 2009 - 06:19

The _video_upload_update_all_videos function checks for all files that have VIDEO_UPLOAD_STATUS_OK but there doesn't seem to be anywhere in the module where the status is set to VIDEO_UPLOAD_STATUS_OK so these updates would never run.
Is this correct?

Shouldn't there be a hook_nodeapi or something that checks if these fields have been altered and if they have, updates the status so that when cron runs these updates are done?

Unless I misunderstand the way it is working this update functionality doesn't look like it would work at all.

#7

Justin W Freeman - October 22, 2009 - 07:08

I am looking at making a patch that changes video_upload_field so that it updates the status if the other fields change.

#8

Justin W Freeman - October 22, 2009 - 22:53
Assigned to:Anonymous» Justin W Freeman

#9

Justin W Freeman - October 23, 2009 - 00:09
Status:active» needs review

Here is a patch that checks the title and body fields for changes when a node is updated and sets the video status accordingly.

Cron will then pick up the changes when it next runs.

You will want to apply the patch in #611380: Call to undefined function _video_upload_node_set_video_status() in video_upload.admin.inc on line 421
when you apply this patch or you will get that error when cron runs the updates.

AttachmentSize
video_upload-439170-9.patch 1.06 KB

#10

Justin W Freeman - October 23, 2009 - 02:34

Found a slight problem with the patch in #9
Here is a better one.

AttachmentSize
video_upload-439170-10.patch 1.24 KB
 
 

Drupal is a registered trademark of Dries Buytaert.