Index: audio.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/audio/audio.module,v
retrieving revision 1.154
diff -u -p -r1.154 audio.module
--- audio.module	10 May 2009 19:03:03 -0000	1.154
+++ audio.module	14 May 2009 19:11:27 -0000
@@ -1158,16 +1158,20 @@ function audio_clean_tag($string) {
  *   Full path to an audio file. be aware that the file will be moved into
  *   drupal's directory.
  * @param $title_format
- *   A t() formatting string for generating the node's title. you can use any
- *   value in the node's audio_tags array as variable. if nothing is provided
- *   the default title format will be used.
+ *   An optional, token string for generating the node's title. If nothing is
+ *   provided the default title format will be used.
+ * @param $body
+ *   An optional string to use for the node's body.
+ * @param $taxonomy
+ *   An optional array of taxonomy terms to assign to the node if the taxonomy
+ *   module is installed.
  * @param $tags
- *   An, optional, array of metadata to add to the node. these will be
- *   available to the $title_format.
+ *   An optional array of metadata to add to the node. These will overwrite
+ *   any values loaded from the ID3 tags.
  * @return
  *   A node or FALSE on error.
  */
-function audio_api_insert($filepath, $title_format = NULL, $tags = array(), $body = NULL) {
+function audio_api_insert($filepath, $title_format = NULL, $body = NULL, $tags = array(), $taxonomy = array()) {
   global $user;
 
   // For node_object_prepare()
@@ -1207,6 +1211,9 @@ function audio_api_insert($filepath, $ti
   if (module_exists('comment')) {
     $node->comment = variable_get("comment_$node->type", COMMENT_NODE_READ_WRITE);
   }
+  if (module_exists('taxonomy') && is_array($taxonomy)) {
+    $node->taxonomy = $taxonomy;
+  }
 
   $node->audio_tags = array();
   $node->audio_images = array();
@@ -1224,8 +1231,8 @@ function audio_api_insert($filepath, $ti
   audio_invoke_audioapi('upload', $node);
 
   // Add the tags (overwriting any that audio_getid3 may have loaded).
-  if ($tags) {
-    $node->audio_tags = $tags;
+  if (is_array($tags)) {
+    $node->audio_tags = array_merge($node->audio_tags, $tags);
   }
 
   // Build the title manually (since we don't call node_validate()).
Index: contrib/import/audio_import.pages.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/audio/contrib/import/audio_import.pages.inc,v
retrieving revision 1.5
diff -u -p -r1.5 audio_import.pages.inc
--- contrib/import/audio_import.pages.inc	14 May 2009 19:07:14 -0000	1.5
+++ contrib/import/audio_import.pages.inc	14 May 2009 19:11:27 -0000
@@ -187,7 +187,7 @@ function audio_import_form_submit($form,
 
 function _audio_import_batch_op($args, &$context) {
   // Create the node object.
-  if ($node = audio_api_insert($args['filepath'], $args['title'], $args['taxonomy'], $args['body'])) {
+  if ($node = audio_api_insert($args['filepath'], $args['title'], $args['body'], array(), $args['taxonomy'])) {
     // Remove the original image now that the import has completed.
     file_delete($args['filepath']);
 
