Index: filefield_meta/filefield_meta.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/filefield/filefield_meta/filefield_meta.install,v
retrieving revision 1.4
diff -u -r1.4 filefield_meta.install
--- filefield_meta/filefield_meta.install	31 Jul 2008 01:02:15 -0000	1.4
+++ filefield_meta/filefield_meta.install	18 Dec 2008 22:55:48 -0000
@@ -6,51 +6,10 @@
  */
 
 /**
- * Implementation of hook_install().
+ * File Field Meta no longer requires a database table.
  */
-function filefield_meta_install() {
-  drupal_install_schema('filefield_meta');
-}
-
-function filefield_meta_uninstall() {
-  drupal_uninstall_schema('filefield_meta');
-}
-
-/**
- * Implementation of hook_schema().
- */
-function filefield_meta_schema() {
-  // The primary field/index.
-  $schema['filefield_meta'] = array(
-    'description' => t('The table for meta data about filefield files.'),
-    'fields' => array(
-      'fid' => array(
-        'description' => t('The file id.'),
-        'type' => 'int',
-        'unsigned' => TRUE,
-        'not null' => TRUE,
-      ),
-      'width' => array(
-        'description' => t('Width of a video or image file in pixels.'),
-        'type' => 'int',
-        'unsigned' => TRUE,
-        'not null' => FALSE,
-      ),
-      'height' => array(
-        'description' => t('Height of a video or image file in pixels.'),
-        'type' => 'int',
-        'unsigned' => TRUE,
-        'not null' => FALSE,
-      ),
-      'duration' => array(
-        'description' => t('The duration of audio or video files, in seconds.'),
-        'type' => 'float',
-        'size' => 'normal',
-        'not null' => FALSE,
-      ),
-    ),
-    'primary key' => array('fid'),
-  );
-
-  return $schema;
+function filefield_meta_update_6001() {
+  $ret = array();
+  $ret[] = update_sql("DROP TABLE {filefield_meta}");
+  return $ret;
 }
Index: filefield_meta/filefield_meta.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/filefield/filefield_meta/filefield_meta.module,v
retrieving revision 1.6
diff -u -r1.6 filefield_meta.module
--- filefield_meta/filefield_meta.module	10 Oct 2008 01:03:09 -0000	1.6
+++ filefield_meta/filefield_meta.module	18 Dec 2008 22:55:48 -0000
@@ -5,6 +5,9 @@
  * FileField Meta: Add Video Support to File Field.
  */
 
+/**
+ * Implementation of hook_theme(). 
+ */
 function filefield_meta_theme() {
   return array(
     'filefield_meta_duration' => array(
@@ -18,37 +21,18 @@
  */
 function filefield_meta_file_insert(&$file) {
   filefield_meta($file);
-  $record = array_merge(array('fid' => $file->fid), $file->data);
-  drupal_write_record('filefield_meta', $record);
 }
 
 /**
  * Implementation of filefield's hook_file_update().
  */
 function filefield_meta_file_update(&$file) {
-  filefield_meta_file_delete($file);
-  filefield_meta_file_insert($file);
-}
-
-/**
- * Implementation of filefield's hook_file_delete().
- */
-function filefield_meta_file_delete($file) {
-  db_query('DELETE FROM {filefield_meta} WHERE fid = %d', $file->fid);
+  filefield_meta($file);
 }
 
 /**
- * Implementation of filefield's hook_file_load().
+ * Sets the file's data to hold the width, height and duration meta information.
  */
-function filefield_meta_file_load(&$file) {
-  if ($meta = db_fetch_array(db_query('SELECT * FROM {filefield_meta} WHERE fid = %d', $file->fid))) {
-    $file->data = is_array($file->data) ? array_merge($meta, $file->data) : $meta;
-  }
-  else {
-    filefield_meta_file_insert($file);
-  }
-}
-
 function filefield_meta(&$file) {
   $info = getid3_analyze($file->filepath);
   $file->data['width'] = $file->data['height'] = $file->data['duration'] = 0;
