diff -rupN video_upload/providers/youtube/youtube.inc video_upload_new/providers/youtube/youtube.inc
--- video_upload/providers/youtube/youtube.inc	2009-09-05 06:51:16.000000000 +1000
+++ providers/youtube/youtube.inc	2009-10-23 13:35:37.000000000 +1100
@@ -245,6 +245,22 @@ function _video_upload_update_video_remo
     $update = TRUE;
   }
 
+  // If the video_upload_sync_published_private option has been chosen and the
+  // node's published status has changed then change the video's private flag.
+  // When private isVideoPrivate() = TRUE and node->status = FALSE
+  // So we need to update when they are equal, not different.
+  if (variable_get('video_upload_sync_published_private', FALSE)) {
+    if ($video->isVideoPrivate() == $node->status) {
+      if (!$node->status) {
+        $video->setVideoPrivate();
+      }
+      else {
+        $video->setVideoPublic();
+      }
+      $update = TRUE;
+    }
+  }
+
   if ($update) {
     // The video has been updated, send changes to YouTube.
     if (_video_upload_gdata_update_video($yt, $video)) {
diff -rupN video_upload/video_upload.admin.inc video_upload_new/video_upload.admin.inc
--- video_upload/video_upload.admin.inc	2009-10-23 13:36:36.000000000 +1100
+++ video_upload.admin.inc	2009-10-23 13:35:37.000000000 +1100
@@ -52,6 +52,19 @@ function _video_upload_admin_settings_fo
     '#default_value' => variable_get('video_upload_youtube_password', FALSE),
     '#required' => TRUE,
   );
+  $form['youtube']['video_upload_upload_published_only'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Only upload videos from published nodes'),
+    '#default_value' => variable_get('video_upload_upload_published_only', FALSE),
+    '#description' => t('If checked, videos for a node will not be uploaded to You Tube until the node is published.'),
+  );
+  $form['youtube']['video_upload_sync_published_private'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Synchronize the node published and You Tube private flags'),
+    '#default_value' => variable_get('video_upload_sync_published_private', FALSE),
+    '#description' => t("If checked, once a video has been uploaded to You Tube. The node's published setting will be synchronized with You Tube's private setting so that when a node is unpublished the video will be marked private and vice-versa."),
+  );
+
   return system_settings_form($form);
 }
 
@@ -300,8 +313,9 @@ function video_upload_admin_video_form()
  */
 function _video_upload_upload_all($fields) {
   $uploaded = 0;
+  $published_only = variable_get('video_upload_upload_published_only', FALSE);
   foreach ($fields as $field => $config) {
-    $result = _video_upload_query_videos($config, VIDEO_UPLOAD_STATUS_UPLOAD_PENDING);
+    $result = _video_upload_query_videos($config, VIDEO_UPLOAD_STATUS_UPLOAD_PENDING, $published_only);
     while ($video = db_fetch_object($result)) {
       $video->field = $config;
       if (video_upload_upload($config, $video)) {
@@ -477,11 +491,12 @@ function _video_upload_delete_rejected_v
  *
  * @param array $config
  *   CCK field definition array.
- *
  * @param string $video_status
  *   Video status
+ * @param boolean $published_only
+ *   Determines whether we should return all nodes or only nodes that have been published.
  */
-function _video_upload_query_videos($config, $status) {
+function _video_upload_query_videos($config, $status, $published_only = FALSE) {
   $db_info = $config['database_information'];
   $params[':video_id'] = $db_info['columns']['video_id']['column'];
   $params[':filefield'] = $db_info['columns']['fid']['column'];
@@ -490,6 +505,7 @@ function _video_upload_query_videos($con
   $params[':video_status'] = $status;
   $params[':filefield_2'] = $db_info['columns']['fid']['column'];
   $multiple = $config['multiple'] ? ', delta' : '';
-  return db_query("SELECT %s AS video_id, nid, %s AS fid, %s AS video_status" . $multiple . " FROM {" . $db_info['table'] . "} t WHERE %s = '%s' AND %s IS NOT NULL", $params);
+  $published = $published_only ? ' AND n.status = 1 ' : '';
+
+  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);
 }
-  
\ No newline at end of file
diff -rupN video_upload/video_upload.module video_upload_new/video_upload.module
--- video_upload/video_upload.module	2009-10-23 13:36:34.000000000 +1100
+++ video_upload.module	2009-10-23 13:35:37.000000000 +1100
@@ -328,9 +328,11 @@ function video_upload_field($op, $node,
 
   // Then if the values that sync with the external video changed update the
   // video status so that next time cron runs the updates are picked up.
+  // Only care about the status if the video_upload_sync_published_private option is set.
   if ($op == 'update') {
     $original_node = node_load($node->nid);
-    if ($node->title != $original_node->title || $node->body != $original_node->body) {
+    if ($node->title != $original_node->title || $node->body != $original_node->body ||
+        (variable_get('video_upload_sync_published_private', FALSE) && $node->status != $original_node->status)) {
       foreach ($items as $key => $item) {
         // We should only be updating videos that are synced or we could cause trouble
         if ($items[$key]['video_status'] == VIDEO_UPLOAD_STATUS_OK_SYNCED) {
