Index: /extensions/gvideo/admin.php
===================================================================
--- /extensions/gvideo/admin.php	(revision 17382)
+++ /extensions/gvideo/admin.php	(revision 17383)
@@ -5,5 +5,4 @@
 
 $conf['gvideo'] = unserialize($conf['gvideo']);
-load_language('plugin.lang', GVIDEO_PATH);
 
 // tabsheet
Index: /extensions/gvideo/admin/add.php
===================================================================
--- /extensions/gvideo/admin/add.php	(revision 17382)
+++ /extensions/gvideo/admin/add.php	(revision 17383)
@@ -12,12 +12,4 @@
     array_push($page['errors'], l10n('Please fill the video URL'));
   }
-  if ($_POST['name_server'] == 'false' and empty($_POST['name']))
-  {
-    array_push($page['errors'], l10n('Please fill the video name'));
-  }
-  if ($_POST['thumbnail_server'] == 'false' and empty($_FILES['thumbnail_src']))
-  {
-    array_push($page['errors'], l10n('Please add a thumbnail'));
-  }
   if ( !empty($_POST['url']) and ($video = parse_video_url($_POST['url'])) === false )
   {
@@ -28,95 +20,70 @@
   {
     // download thumbnail
-    $thumb_name = $video['type'].'-'.$video['id'].'-'.uniqid();
-    if ($_POST['thumbnail_server'] == 'true')
+    $thumb_name = $video['type'].'-'.$video['id'].'-'.uniqid().'.'.get_extension($video['thumbnail']);
+    $thumb_source = $conf['data_location'].$thumb_name;
+    if (download_remote_file($video['thumbnail'], $thumb_source) !== true)
     {
-      $thumb_name.= '.'.get_extension($video['thumbnail']);
-      $thumb_source = $conf['data_location'].$thumb_name;
-      if (download_remote_file($video['thumbnail'], $thumb_source) !== true)
-      {
-        $thumb_source = $conf['data_location'].get_filename_wo_extension($thumb_name).'.jpg';
-        copy(GVIDEO_PATH.'mimetypes/'.$video['type'].'.jpg', $thumb_source);
-      }
-    }
-    // upload thumbnail
-    else
-    {
-      if ($_FILES['thumbnail_src']['error'] > 0) 
-      {
-        array_push($page['errors'], l10n('Unknown upload error'));
-      }
-      else if ( !in_array($_FILES['thumbnail_src']['type'], array('image/jpeg','image/png','image/gif')) )
-      {
-        array_push($page['errors'], l10n('Incorrect file type,').' '.sprintf(l10n('Allowed file types: %s.'), 'jpg, png, gif'));
-      }
-      
-      $thumb_name.= '.'.get_extension($_FILES['thumbnail_src']['name']);
-      $thumb_source = $_FILES['thumbnail_src']['tmp_name'];
+      $thumb_source = $conf['data_location'].get_filename_wo_extension($thumb_name).'.jpg';
+      copy(GVIDEO_PATH.'mimetypes/'.$video['type'].'.jpg', $thumb_source);
     }
     
-    if (count($page['errors']) == 0)
+    if (isset($_POST['add_film_frame']))
     {
-      if (isset($_POST['add_film_frame']))
-      {
-        add_film_frame($thumb_source);
-      }
+      add_film_frame($thumb_source);
+    }
+    
+    // add image and update infos
+    $image_id = add_uploaded_file($thumb_source, $thumb_name, array($_POST['category']));
+    
+    $updates = array(
+      'name' => pwg_db_real_escape_string($video['title']),
+      'comment' => pwg_db_real_escape_string($video['description']),
+      'author' => pwg_db_real_escape_string($video['author']),
+      );
+    
+    single_update(
+      IMAGES_TABLE,
+      $updates,
+      array('id' => $image_id),
+      true
+      );
+    
+    // register video
+    if ($_POST['size_common'] == 'true')
+    {
+      $_POST['width'] = $_POST['height'] = '';
+    }
+    if ($_POST['autoplay_common'] == 'true')
+    {
+      $_POST['autoplay'] = '';
+    }
+    
+    $insert = array(
+      'picture_id' => $image_id,
+      'url' => $video['url'],
+      'type' => $video['type'],
+      'video_id' => $video['id'],
+      'width' => $_POST['width'],
+      'height' => $_POST['height'],
+      'autoplay' => $_POST['autoplay'],
+      );
       
-      // add image and update infos
-      $image_id = add_uploaded_file($thumb_source, $thumb_name, array($_POST['category']));
+    single_insert(
+      GVIDEO_TABLE,
+      $insert
+      );
       
-      if ($_POST['name_server'] == 'true')        $_POST['name'] = $video['title'];
-      if ($_POST['description_server'] == 'true') $_POST['description'] = $video['description'];
-      if ($_POST['author_server'] == 'true')      $_POST['author'] = $video['author'];
-      
-      $updates = array(
-        'name' => pwg_db_real_escape_string($_POST['name']),
-        'comment' => pwg_db_real_escape_string(@$_POST['description']),
-        'author' => pwg_db_real_escape_string(@$_POST['author']),
-        );
-      
-      single_update(
-        IMAGES_TABLE,
-        $updates,
-        array('id' => $image_id),
-        true
-        );
-      
-      // register video
-      if ($_POST['size_common'] == 'true')
-      {
-        $_POST['width'] = $_POST['height'] = '';
-      }
-      if ($_POST['autoplay_common'] == 'true')
-      {
-        $_POST['autoplay'] = '';
-      }
-      
-      $insert = array(
-        'picture_id' => $image_id,
-        'type' => $video['type'],
-        'video_id' => $video['id'],
-        'width' => $_POST['width'],
-        'height' => $_POST['height'],
-        'autoplay' => $_POST['autoplay'],
-        );
-        
-      single_insert(
-        GVIDEO_TABLE,
-        $insert
-        );
-        
-      array_push($page['infos'], sprintf(
-        l10n('Video successfully added. <a href="%s">View</a>'), 
-        make_picture_url(array(
-          'image_id' => $image_id,
-          'category' => array(
-            'id' => $_POST['category'],
-            'name' => '',
-            'permalink' => '',
-            ),
-          ))
-        ));
-      unset($_POST);
-    }
+    array_push($page['infos'], sprintf(
+      l10n('Video successfully added. <a href="%s">View</a>'), 
+      make_picture_url(array(
+        'image_id' => $image_id,
+        'category' => array(
+          'id' => $_POST['category'],
+          'name' => '',
+          'permalink' => '',
+          ),
+        ))
+      ));
+    unset($_POST);
   }
 }
@@ -143,4 +110,5 @@
   'upload_max_filesize' => $upload_max_filesize,
   'upload_max_filesize_shorthand' => $upload_max_filesize_shorthand,
+  'gd_available' => function_exists('imagecreatetruecolor'),
   'gvideo' => $conf['gvideo'],
   'POST' => @$_POST,
Index: /extensions/gvideo/admin/template/add.tpl
===================================================================
--- /extensions/gvideo/admin/template/add.tpl	(revision 17382)
+++ /extensions/gvideo/admin/template/add.tpl	(revision 17383)
@@ -37,48 +37,11 @@
       </label>
     </li>
-    <li>
-      <span class="property">{'Name'|@translate}</span>
-      <label><input type="radio" name="name_server" value="true" {if $POST.name_server != 'false'}checked="checked"{/if} data-toggle="name"> {'From the video'|@translate}</label>
-      <label><input type="radio" name="name_server" value="false" {if $POST.name_server == 'false'}checked="checked"{/if} data-toggle="name"> {'Change'|@translate}</label>
-    </li>
-    <li {if $POST.name_server != 'false'}style="display:none;"{/if} id="name">
-      <span class="property">&nbsp;</span>
-      <input type="text" name="name" value="{$POST.name}" size="70">
-    </li>
-    <li>
-      <span class="property">{'Author'|@translate}</span>
-      <label><input type="radio" name="author_server" value="true" {if $POST.author_server != 'false'}checked="checked"{/if} data-toggle="author"> {'From the video'|@translate}</label>
-      <label><input type="radio" name="author_server" value="false" {if $POST.author_server == 'false'}checked="checked"{/if} data-toggle="author"> {'Change'|@translate}</label>
-    </li>
-    <li {if $POST.author_server != 'false'}style="display:none;"{/if} id="author">
-      <span class="property">&nbsp;</span>
-      <input type="text" name="author" value="{$POST.author}" size="20">
-    </li>
-    <li>
-      <span class="property">{'Description'|@translate}</span>
-      <label><input type="radio" name="description_server" value="true" {if $POST.description_server != 'false'}checked="checked"{/if} data-toggle="description"> {'From the video'|@translate}</label>
-      <label><input type="radio" name="description_server" value="false" {if $POST.description_server == 'false'}checked="checked"{/if} data-toggle="description"> {'Change'|@translate}</label>
-    </li>
-    <li {if $POST.description_server != 'false'}style="display:none;"{/if} id="description">
-      <span class="property">&nbsp;</span>
-      <textarea name="description" rows="5" cols="50">{$POST.description}</textarea>
-    </li>
+  {if $gd_available}
     <li>
       <span class="property">{'Thumbnail'|@translate}</span>
-      <label><input type="radio" name="thumbnail_server" value="true" checked="checked" data-toggle="thumbnail_src"> {'From the video'|@translate}</label>
-      <label><input type="radio" name="thumbnail_server" value="false" data-toggle="thumbnail_src"> {'Change'|@translate}</label>
-    </li>
-    <li id="thumbnail_src" style="display:none;">
-      <span class="property">&nbsp;</span>
-      <input type="file" name="thumbnail_src"><br>
-      <span class="property">&nbsp;</span>
-      {'Maximum file size: %sB.'|@translate|@sprintf:$upload_max_filesize_shorthand} {'Allowed file types: %s.'|@translate|@sprintf:'jpg, png, gif'}
-      <input type="hidden" name="MAX_FILE_SIZE" value="{$upload_max_filesize}">
-    </li>
-    <li>
-      <span class="property">&nbsp;</span>
       <label><input type="checkbox" name="add_film_frame" value="true"> {'Add film effect'|@translate} </label>
       <a class="showInfo" title="<img src='{$GVIDEO_PATH}admin/template/example-frame.jpg'>">i</a>
     </li>
+  {/if}
   </ul>  
 </fieldset>
@@ -117,5 +80,5 @@
   <legend>{'Supported services'|@translate}</legend>
   
-  <ul>
+  <ul class="services">
     <li>
       <img class="icon" src="{$GVIDEO_PATH}admin/template/icons/youtube.png">
Index: /extensions/gvideo/admin/template/style.css
===================================================================
--- /extensions/gvideo/admin/template/style.css	(revision 17382)
+++ /extensions/gvideo/admin/template/style.css	(revision 17383)
@@ -52,2 +52,7 @@
   font-size:0.8em;
 }
+
+ul.services li {
+  display:inline;
+  margin-left:20px;
+}
Index: /extensions/gvideo/include/functions.inc.php
===================================================================
--- /extensions/gvideo/include/functions.inc.php	(revision 17382)
+++ /extensions/gvideo/include/functions.inc.php	(revision 17383)
@@ -40,4 +40,5 @@
       $json = json_decode($json, true);
       $video = array_merge($video, array(
+        'url' => 'http://youtube.com/watch?v='.$video['id'],
         'title' => $json['entry']['title']['$t'],
         'description' => $json['entry']['media$group']['media$description']['$t'],
@@ -62,4 +63,5 @@
       $json = json_decode($json, true);
       $video = array_merge($video, array(
+        'url' => 'http://vimeo.com/'.$video['id'],
         'title' => $json[0]['title'],
         'description' => $json[0]['description'],
@@ -88,4 +90,5 @@
       $video = array_merge($video, array(
         'id' => $json['id'],
+        'url' => 'http://dailymotion.com/video/'.$json['id'],
         'title' => $json['title'],
         'description' => $json['description'],
@@ -108,4 +111,6 @@
       $video['id'] = $matches[1];
       
+      $video['url'] = $source_url;
+      
       preg_match('#<meta name="name" content="([^">]*)" />#', $html, $matches);
       $video['title'] = $matches[1];
@@ -131,5 +136,7 @@
       $html = download_remote_file($source_url, true);
       if ($html === false or $html == 'file_error') return false;
-            
+      
+      $video['url'] = 'http://wideo.fr/video/'.$video['id'].'.html';
+      
       preg_match('#<meta property="og:title" content="([^">]*)" />#', $html, $matches);
       $video['title'] = $matches[1];
@@ -166,5 +173,7 @@
       $html = download_remote_file($source_url, true);
       if ($html === false or $html == 'file_error') return false;
-            
+      
+      $video['url'] = 'http://www.videobb.com/video/'.$video['id'];
+      
       preg_match('#<meta content="videobb - ([^">]*)"  name="title" property="" />#', $html, $matches);
       $video['title'] = $matches[1];
Index: /extensions/gvideo/include/gvideo.inc.php
===================================================================
--- /extensions/gvideo/include/gvideo.inc.php	(revision 17382)
+++ /extensions/gvideo/include/gvideo.inc.php	(revision 17383)
@@ -70,9 +70,9 @@
 
 /**
- * add message on edition page
+ * add message and link on edition page
  */
 function gvideo_photo_edit()
 {
-  global $page;
+  global $page, $template, $conf;
   
   if ($page['page'] != 'photo') return;
@@ -85,9 +85,44 @@
   $result = pwg_query($query);
   
-  if (pwg_db_num_rows($result))
+  if (!pwg_db_num_rows($result)) return;
+    
+  $video = pwg_db_fetch_assoc($result);
+    
+  array_push($page['warnings'], l10n('This element is a video added with "Embedded Video"'));
+  
+  if (function_exists('imagecreatetruecolor'))
   {
-    array_push($page['warnings'], l10n('This element is a video added with "Embedded Video"'));
+    if (isset($_GET['add_film_frame']))
+    {
+      include_once(GVIDEO_PATH . '/include/functions.inc.php');
+      include_once(PHPWG_ROOT_PATH . 'admin/include/functions_upload.inc.php');
+      
+      $image_infos = pwg_db_fetch_assoc(pwg_query('SELECT path, file FROM '.IMAGES_TABLE.' WHERE id = '.$_GET['image_id'].';'));
+      $thumb_source = $conf['data_location'].$image_infos['file'];
+      
+      add_film_frame($image_infos['path'], $thumb_source);
+      add_uploaded_file($thumb_source, $image_infos['file'], null, null, $_GET['image_id']);
+      $template->assign('TN_UPDATE', true);
+    }
+    
+    $admin_photo_base_url = get_root_url().'admin.php?page=photo-'.$_GET['image_id'];
+    $admin_url_start = $admin_photo_base_url.'-properties';
+    $admin_url_start.= isset($_GET['cat_id']) ? '&amp;cat_id='.$_GET['cat_id'] : '';
+    
+    $template->assign('U_ADD_FILM_FRAME', $admin_url_start.'&amp;add_film_frame=1');
+    $template->set_prefilter('picture_modify', 'gvideo_photo_edit_prefilter');
   }
 }
 
+function gvideo_photo_edit_prefilter($content)
+{
+  $search[0] = '{if !url_is_remote($PATH)}';
+  $replace[0] = '<li><a href="{$U_ADD_FILM_FRAME}" id="refresh_video">{\'Add film effect\'|@translate}</a></li>'.$search[0];
+  
+  $search[1] = '{$TN_SRC}';
+  $replace[1] = $search[1].'{if $TN_UPDATE}?'.time().'{/if}';
+  
+  return str_replace($search, $replace, $content);
+}
+
 ?>
Index: /extensions/gvideo/language/en_UK/plugin.lang.php
===================================================================
--- /extensions/gvideo/language/en_UK/plugin.lang.php	(revision 17382)
+++ /extensions/gvideo/language/en_UK/plugin.lang.php	(revision 17383)
@@ -3,6 +3,4 @@
 $lang['Add a video'] = 'Add a video';
 $lang['Video URL'] = 'Video URL';
-$lang['From the video'] = 'From the video';
-$lang['Change'] = 'Change';
 $lang['Video size'] = 'Video size';
 $lang['Use common setting'] = 'Use common setting';
@@ -15,6 +13,4 @@
 $lang['Logo'] = 'Logo';
 $lang['Please fill the video URL'] = 'Please fill the video URL';
-$lang['Please fill the video name'] = 'Please fill the video name';
-$lang['Please add a thumbnail'] = 'Please add a thumbnail';
 $lang['Unable to contact host server'] = 'Unable to contact host server';
 $lang['Video successfully added. <a href="%s">View</a>'] = 'Video successfully added. <a href="%s">View</a>';
Index: /extensions/gvideo/language/fr_FR/plugin.lang.php
===================================================================
--- /extensions/gvideo/language/fr_FR/plugin.lang.php	(revision 17382)
+++ /extensions/gvideo/language/fr_FR/plugin.lang.php	(revision 17383)
@@ -3,6 +3,4 @@
 $lang['Add a video'] = 'Ajouter une vidéo';
 $lang['Video URL'] = 'URL de la vidéo';
-$lang['From the video'] = 'Conserver';
-$lang['Change'] = 'Changer';
 $lang['Video size'] = 'Taille de la vidéo';
 $lang['Use common setting'] = 'Utiliser les paramètres généraux';
@@ -15,6 +13,4 @@
 $lang['Logo'] = 'Logo';
 $lang['Please fill the video URL'] = 'Veuillez renseigner l\'URL de la vidéo';
-$lang['Please fill the video name'] = 'Veuillez renseigner le nom de la vidéo';
-$lang['Please add a thumbnail'] = 'Veuillez choisir une miniature';
 $lang['Unable to contact host server'] = 'Impossible de contacter le serveur';
 $lang['Video successfully added. <a href="%s">View</a>'] = 'Vidéo ajoutée. <a href="%s">Voir</a>';
Index: /extensions/gvideo/main.inc.php
===================================================================
--- /extensions/gvideo/main.inc.php	(revision 17382)
+++ /extensions/gvideo/main.inc.php	(revision 17383)
@@ -26,4 +26,10 @@
   add_event_handler('loc_begin_admin_page', 'gvideo_photo_edit');
   add_event_handler('get_admin_plugin_menu_links', 'gvideo_admin_menu');
+  add_event_handler('init', 'gvideo_init');
+  
+  function gvideo_init()
+  {
+    load_language('plugin.lang', GVIDEO_PATH);
+  }
 
   function gvideo_admin_menu($menu) 
Index: /extensions/gvideo/maintain.inc.php
===================================================================
--- /extensions/gvideo/maintain.inc.php	(revision 17382)
+++ /extensions/gvideo/maintain.inc.php	(revision 17383)
@@ -31,5 +31,5 @@
   );
 
-
+/* install */
 function plugin_install() 
 {
@@ -41,9 +41,10 @@
 CREATE TABLE IF NOT EXISTS `'.gvideo_table.'` (
   `picture_id` mediumint(8) NOT NULL,
+  `url` varchar(255) DEFAULT NULL,
   `type` varchar(64) NOT NULL,
   `video_id` varchar(64) NOT NULL,
   `width` smallint(9) DEFAULT NULL,
   `height` smallint(9) DEFAULT NULL,
-  `autoplay` tinyint(1) DEFAULT NULL
+  `autoplay` tinyint(1) DEFAULT NULL,
 ) ENGINE=MyISAM DEFAULT CHARSET=utf8
 ;';
@@ -59,4 +60,5 @@
 }
 
+/* activate */
 function plugin_activate()
 {
@@ -67,10 +69,20 @@
     plugin_install();
   }
-  else if (!isset($conf['gvideo']))
-  {
-    conf_update_param('gvideo', gvideo_default_config);
-  }
-}
-
+  else 
+  {
+    if (!isset($conf['gvideo']))
+    {
+      conf_update_param('gvideo', gvideo_default_config);
+    }
+    
+    $result = pwg_query('SHOW COLUMNS FROM '.gvideo_table.' LIKE "url";');
+    if (!pwg_db_num_rows($result))
+    {      
+      pwg_query('ALTER TABLE '.gvideo_table.' ADD `url` VARCHAR(255) DEFAULT NULL;');
+    }
+  }
+}
+
+/* uninstall */
 function plugin_uninstall() 
 {  
@@ -106,4 +118,14 @@
   }
   
+  if (!isset($conf['prefix_thumbnail']))
+  {
+    $conf['prefix_thumbnail'] = 'TN-';
+  }
+
+  if (!isset($conf['dir_thumbnail']))
+  {
+    $conf['dir_thumbnail'] = 'thumbnail';
+  }
+  
   set_time_limit(600);
   include_once(gvideo_path . '/include/functions.inc.php');
@@ -123,35 +145,33 @@
     {
       case 'vimeo':
-        $url = 'http://vimeo.com/'.$file['id'];
+        $video = array(
+          'type' => 'vimeo',
+          'url' => 'http://vimeo.com/'.$file['id'],
+          );
         break;
       case 'dm':
-        $url = 'http://dailymotion.com/video/'.$file['id'];
+        $video = array(
+          'type' => 'dailymotion',
+          'url' => 'http://dailymotion.com/video/'.$file['id'],
+          );
         break;
       case 'ytube':
-        $url = 'http://youtu.be/'.$file['id'];
+        $video = array(
+          'type' => 'youtube',
+          'url' => 'http://youtube.com/watch?v='.$file['id'],
+          );
         break;
       case 'wideo':
-        $url = 'http://wideo.fr/video/'.$file['id'].'.html';
-        break;
-        
-      case 'wat': // can't get original page from id !
-        $thumb = str_replace($img['file'], null, $img['path']).'thumbnail/TN-'.get_filename_wo_extension($img['file']).'.*';
-        $thumb = glob($thumb);
-        if (!empty($thumb))
-        {
-          $thumb_name = 'wat-'.$file['id'].'-'.uniqid().'.'.get_extension($thumb[0]);
-          $thumb_source = $conf['data_location'].$thumb_name;
-          copy($thumb[0], $thumb_source);
-        }
-        
+        $video = array(
+          'type' => 'wideo',
+          'url' => 'http://wideo.fr/video/'.$file['id'].'.html',
+          );
+        break;
+      case 'wat':
         $video = array(
           'type' => 'wat',
-          'id' => $file['id'],
-          'title' => null,
-          'description' => null,
-          'thumbnail' => null,
-          );
-        break;
-        
+          'url' => null,
+          );
+        break;
       case 'gvideo': // closed
       default:
@@ -160,25 +180,21 @@
     }
     
-    // get video infos
-    if (!isset($video))
-    {
-      if ( ($video = parse_video_url($url)) === false )
-      {
-        array_push($images_delete, $img['id']);
-        continue;
-      }
-    }
-    
-    // download thumbnail
-    if (!isset($thumb_source))
-    {
-      $thumb_name = $video['type'].'-'.$video['id'].'-'.uniqid().'.'.get_extension($video['thumbnail']);
+    $real_path = str_replace($img['file'], null, str_replace('././', './', $img['path']));
+    
+    // get existing thumbnail
+    $thumb = $real_path.$conf['dir_thumbnail'].'/'.$conf['prefix_thumbnail'].get_filename_wo_extension($img['file']).'.*';
+    $thumb = glob($thumb);
+    if (!empty($thumb))
+    {
+      $thumb_name = $video['type'].'-'.$file['id'].'-'.uniqid().'.'.get_extension($thumb[0]);
       $thumb_source = $conf['data_location'].$thumb_name;
-      if (download_remote_file($video['thumbnail'], $thumb_source) !== true)
-      {
-        $thumb_source = $conf['data_location'].get_filename_wo_extension($thumb_name).'.jpg';
-        copy(gvideo_path.'mimetypes/'.$video['type'].'.jpg', $thumb_source);
-        add_film_frame($thumb_source);
-      }
+      copy($thumb[0], $thumb_source);
+    }
+    else
+    {
+      $thumb_name = $video['type'].'-'.$file['id'].'-'.uniqid().'.jpg';
+      $thumb_source = $conf['data_location'].$thumb_name;
+      copy(gvideo_path.'mimetypes/'.$video['type'].'.jpg', $thumb_source);
+      add_film_frame($thumb_source);
     }
     
@@ -187,9 +203,9 @@
     
     // update path and rename the file
-    $img['new_path'] = str_replace($img['file'], null, $img['path']).$thumb_name;
+    $img['new_path'] = $real_path.$thumb_name;
     rename($img['path'], $img['new_path']);
     array_push($images_updates, array(
       'id' => $img['id'],
-      'path' => str_replace('././', './', $img['new_path']),
+      'path' => $img['new_path'],
       ));
     
@@ -200,6 +216,7 @@
     array_push($videos_inserts, array(
       'picture_id' => $image_id,
+      'url' => $video['url'],
       'type' => $video['type'],
-      'video_id' => $video['id'],
+      'video_id' => $file['id'],
       'width' => $file['width'],
       'height' => $file['height'],
@@ -216,5 +233,5 @@
   mass_inserts(
     gvideo_table,
-    array('picture_id', 'type', 'video_id', 'width', 'height', 'autoplay'),
+    array('picture_id', 'url', 'type', 'video_id', 'width', 'height', 'autoplay'),
     $videos_inserts
     );
