Closed (outdated)
Project:
Video Upload
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
4 May 2009 at 19:03 UTC
Updated:
12 Apr 2020 at 20:27 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
sainzu commentedComment #2
happydrupal commentedI agree with this.....
YouTube will cancel the account automatically if your videos cross the YouTube Community Guidelines twice. Anyone who has bad intention is pretty easy to upload some bad video and shut your service down without notice.
Comment #3
jhedstromI'll try to work this into the upcoming stable release.
Comment #4
happydrupal commentedGreat appreciated.
Comment #5
agileware commentedSubscribing
Comment #6
Andrew Kaufmann commentedI too am greatly interested in workflow being implemented -- for the very reason happydrupal mentioned. Subscribing.
Comment #7
agileware commentedI'm working on this currently I have a patch that works but I am adding one more feature to it first.
That feature is the ability to link the published status of the node to the private status of the You Tube video so once the video is uploaded, if you change the node to unpublished the video goes private and vice versa.
This second feature relies on
#439170: update youtube video if node is updated and
#611380: Call to undefined function _video_upload_node_set_video_status() in video_upload.admin.inc on line 421
So I will do those and then finish this.
Comment #8
agileware commentedHere is the patch.
It gives two new options on the admin/settings/video-upload screen (at the moment they are in the You Tube fieldset but they could be outside of that if that is preferred).
One is to only copy videos up once the node they are on is published.
The second is to sync the nodes published flag with the you tube videos private flag.
You will need to apply the patches in these two issues before you apply this one as they are all required for the syncing of status to work:
#439170: update youtube video if node is updated
#611380: Call to undefined function _video_upload_node_set_video_status() in video_upload.admin.inc on line 421
Comment #9
Andrew Kaufmann commentedThanks for doing this, Justin! I'll give this a shot as soon as I can...
Comment #10
Andrew Kaufmann commentedI just ran the three patches, and gave it a shot... and it appears to work as advertised. It wasn't a thorough review, by any stretch... but the video did not get uploaded, as desired, until after the node was set to published.
Good work!
Comment #11
agileware commentedComment #12
Andrew Kaufmann commentedDoesn't look like this was ever worked into stable release? Is there a problem with the patch?
Comment #13
shopdogg commentedsub
Comment #14
bojanz commentedIt was never worked into a release.
The supporting patches (that this functionality depended on) were committed though.
It could be considered for 2.x, but I won't be able to take a look before late september.
Comment #15
itserich commentedI would like to install this patch. This is the first attempt I have made to install via command line.
Please let me know if this is correct:
1-install module in sites/all/modules (is it okay to use 1.x or 2.x-dev)
2-download patch to sites/all/modules
3-command: patch -p) sites/all/modules/video_upload-453458-8.patch
So the name of the module to which the patch is applied is self contained in the patch?
Is there a better place to install the patch, a separate folder perhaps to make tracking easier?
Thanks to anyone for advice.
EDIT Then there is this http://drupal.org/patch/apply
"Applying patches, modifying files according to instructions in the patch file, is the domain of patch programs. There are many different programs with this functionality, some stand-alone (patch), some integrated in IDEs (Eclipse, XCode).
Warning: Patching is something that should never be done on your production site unless you have sufficient backup and testing performed. While patching itself is relatively easy, understanding the implications of a patch is not. Patching your system can lead to loss of data and/or site instabilities.
This page only deals with some basic principles using the command line utility patch. Patch can be found on most UNIX systems and is included in the packages UnxUtils and Cygwin for use on Windows. There is also a video on Applying patches to Drupal core in the videocasts section.
Provided that the patch was made relative to the root directory of the concerned project, navigate to the that directory (using cd). For a patch on Drupal, that will be the Drupal directory; for a contrib module or theme, that is the root directory of the project. Once there, issue the command:
patch -p0 < path/file.patch
If the patch was not made relative to the project's root directory, you can place the patch in the same directory as the file being patched and run the patch command without the -p option. To do so, cd to the directory and type:
patch < file.patch
Patch will usually auto-detect the format. You can also use the -u command line option to indicate a unified patch, and the -b option creates a backup copy of the file before modifying it. In case of problems, you can then easily restore the backup file."
Comment #16
itserich commentedWell it appears that is correct but I get a command not found error because my host does not allow users to install patches via command line.
Comment #17
bojanz commentedHere's an updated patch for 2.x.
I'm also attaching a patched archive so that itserich and others can test more easily.
If you've already installed 2.x, just replace the old files with the new ones.
This also contains the patch from #439170: update youtube video if node is updated, so getting that one tested so that I can commit it would speed this one up too.
Comment #18
bojanz commentedUpdated patch, since I've committed some conflicting issues since then.
The archive above is still okay for testing.
Comment #19
itserich commentedThank you bojanz.
I tried to apply the patch manually and apparently failed.
I am trying to figure out Tortoise but have not yet.
To confirm, if I try it again manually should I apply the patch in #18 to the current development version?
Thanks for this module, it is the only way I know of to upload directly to youtube.
Comment #20
bojanz commentedYes. However, you can just use the zip archive I provided and skip patching completely.
Comment #21
itserich commentedThank you. The zip seems to install fine.
However, it did not cause videos of unpublished nodes to be set to private.
Attached are configuration screen images.
I created a node, did not publish it, and it still appeared on Youtube as "This video is public."
I then published it, ran cron, still public. Unpublished, ran cron, still public
I tried a couple times, and created a new content type, with same result.
I then went to Youtube and set the video to private, and back to the node and published and unpublished it, runninng cron. The video stayed private.
Perhaps something needs to be set at the Youtube account to enable this? Just a guess. Thanks.
Edit Also, deleted node, ran cron, and video remains on Youtube. Also, to confirm, there is no need for a unique cron job, just the regular drupal cron, right?
Comment #22
bojanz commentedYes, just the regular cron.
How did you upload the video to youtube, through direct upload, or browser upload (with the jquery ui based upload dialog?)?
Comment #23
izmeez commentedsubscribing
Comment #24
itserich commentedThanks, I had tried both the direct and the browser upload.
Based on reading the intro comments ("The video should be uploaded ONLY IF the node (that contains the video) is marked as published. This") on this thread it appears browser upload would not be supported for this feature.
The problem I have when I use the direct method, the video does reach my host but does not get uploaded to Youtube.
I think I disabled WYSIWYG for this content type, not sure if that is still required. But that could be the cause, I am not sure what it means to turn it off per node.
Attached are some screen shots. I tried a small file under 2MB.
Comment #25
bojanz commentedOkay, thanks, I'll take the testing from here. The patch probably needs some more work then...
Comment #26
itserich commentedAs to the direct method, I don't think that worked with the versions I have tried, prior to this release, so it may be a problem with my site or host.
That is, the method which is uploaded first to the host and then sent to youtube. I don't think that has worked for me previously.
Comment #27
bojanz commentedI'm thinking about what to do with the browser upload workflow.
As you know, browser upload lets the user upload videos directly to
youtube, bypassing the server.
This naturally makes it difficult for us to police the process in any
way. It comes down to two options:
1) We can have an option to have the videos uploaded via browser
upload marked as "private" initially, and then synchronized to the
node status on cron run. Not sure if that is enough for the YouTube
censors (don't know if they prosecute private videos against
guidelines the same as the public ones)
2) The other option is to hide the browser upload until the node has
been published. This is less than ideal in several ways: the user
needs to edit the node in order to publish the video, and you still
have no guarantee he won't upload anything nasty.
That's it... The user can either upload or he can't. The only thing we can do is mark the video as private along the way..
If someone has a bright idea, now's the time to say it.
Comment #28
bojanz commentedI got help on Google's forum for the YouTube API, and now have some answers.
There are two ways your video can be "wrong".
1. It can be copyrighted, in which case it's flagged by the automatic system as soon as it's uploaded.
This is something browser upload can't protect you from. If you fear that users might upload copyrighted videos, switch to direct upload, or use YouTube Direct (which is a whole different story).
2. It can be reported by viewers as "inappropriate". This can be avoided by setting the newly uploaded file (even with browser upload) to "private" by default. Then, the status can be synchronized to the node status when cron runs.
Comment #29
westis commentedIs this patch considered to be added? I think it's a great option to have.
Comment #30
lucale commentedNews about the implementation of this feature in new version ?
I've applied the patch downloaded from this discussion and i receive the following error when cron started
Thanks a lot.
Comment #31
lucale commentedNo help about this kind of error ??
Is this error related on syntax of this line of code?
return db_query("SELECT %s AS video_id, t.nid, %s AS fid, %s AS video_status" . $multiple . " FROM {" . $db_info['table'] . "} t, {node} n WHERE n.nid = t.nid AND %s = '%s' AND %s IS NOT NULL" . $published, $params);
}
Thanks in advance.
Comment #32
avpadernoI am closing this issue, since it's for a Drupal version no longer supported.