diff -urp itunes-cvs/itunes.admin.inc itunes/itunes.admin.inc
--- itunes-cvs/itunes.admin.inc	2009-06-03 18:55:03.000000000 +0200
+++ itunes/itunes.admin.inc	2009-06-16 10:05:40.000000000 +0200
@@ -2,10 +2,17 @@
 // $Id: itunes.admin.inc,v 1.4 2009/06/03 16:55:03 drewish Exp $
 
 /**
+ * @file
+ * Admin settings for iTunes.
+ */
+
+/**
  * Settings form.
  */
 function itunes_admin_settings() {
   $node_types = node_get_types();
+  $content_module_exists = module_exists('content');
+  $content_types = $content_module_exists ? content_types() : array();
 
   // Build a list of node types that iTunes could operate on.
   $options = array();
@@ -19,22 +26,23 @@ function itunes_admin_settings() {
     '#default_value' => variable_get('itunes_types', array('audio')),
   );
 
-  // If FileField is enabled then let them select the enclosure field.
-  if (module_exists('content') && module_exists('filefield')) {
-    $fields = variable_get('itunes_filefields', array());
-    $form['itunes_filefields'] = array(
+  // Allow selection of the feed item's enclosure source if FileField is
+  // enabled then let them select the enclosure field.
+  if ($content_module_exists && module_exists('filefield')) {
+    $fields = variable_get('itunes_enclosure_source', array());
+    $form['itunes_enclosure_source'] = array(
       '#tree' => TRUE,
     );
     // Build the node's filefield selector.
     foreach ($node_types as $type) {
-      $content = content_types($type->type);
+      $content = $content_types[$type->type];
       $options = array(NULL => t('- None -'));
       foreach ($content['fields'] as $field_name => $field) {
         if ($field['type'] == 'filefield') {
           $options[$field_name] = $field['widget']['label'];
         }
       }
-      $form['itunes_filefields'][$type->type] = array(
+      $form['itunes_enclosure_source'][$type->type] = array(
         '#type' => 'select',
         '#options' => $options,
         '#default_value' => empty($fields[$type->type]) ? NULL : $fields[$type->type],
@@ -43,19 +51,19 @@ function itunes_admin_settings() {
     }
   }
 
+  // Allow selection of the feed item's tag source if taxonomy is enabled.
   if (module_exists('taxonomy')) {
-    $vocabs = variable_get('itunes_vocabularies', array());
-    $form['itunes_vocabularies'] = array(
+    $vocabs = variable_get('itunes_keyword_source', array());
+    $form['itunes_keyword_source'] = array(
       '#tree' => TRUE,
     );
-    // Build the node's filefield selector.
     foreach ($node_types as $type) {
       $type_vocabs = taxonomy_get_vocabularies($type->type);
       $options = array(NULL => t('- None -'));
       foreach ($type_vocabs as $vid => $vocab) {
         $options[$vid] = $vocab->name;
       }
-      $form['itunes_vocabularies'][$type->type] = array(
+      $form['itunes_keyword_source'][$type->type] = array(
         '#type' => 'select',
         '#options' => $options,
         '#default_value' => empty($type_vocabs[$type->type]) ? NULL : $type_vocabs[$type->type],
@@ -64,6 +72,34 @@ function itunes_admin_settings() {
     }
   }
 
+  // Allow selection of the feed item's author source.
+  $author_source = variable_get('itunes_author_source', array());
+  $form['itunes_author_source'] = array(
+    '#tree' => TRUE,
+  );
+  foreach ($node_types as $type) {
+    $options = array(
+      NULL => t('- None -'),
+      'node_author' => t('Node author'),
+    );
+    if ($content_module_exists) {
+      $content = $content_types[$type->type];
+      foreach ($content['fields'] as $field_name => $field) {
+        if ($field['type'] == 'text' && $field['widget']['type'] == 'text_textfield') {
+          $options[$field_name] = $field['widget']['label'];
+        }
+        elseif ($field['type'] == 'userreference') {
+          $options[$field_name] = $field['widget']['label'];
+        }
+      }
+    }
+    $form['itunes_author_source'][$type->type] = array(
+      '#type' => 'select',
+      '#options' => $options,
+      '#default_value' => empty($author_source[$type->type]) ? NULL : $author_source[$type->type],
+    );
+  }
+
   $form = system_settings_form($form);
   $form['#validate'][] = 'itunes_admin_settings_validate';
   $form['#theme'] = 'itunes_admin_settings';
@@ -84,14 +120,15 @@ function theme_itunes_admin_settings($fo
   $has_vocabularies = FALSE;
   foreach (element_children($form['itunes_types']) as $key) {
     $row = array(drupal_render($form['itunes_types'][$key]));
-    if (isset($form['itunes_filefields'][$key])) {
-      $row[] = drupal_render($form['itunes_filefields'][$key]);
+    if (isset($form['itunes_enclosure_source'][$key])) {
+      $row[] = drupal_render($form['itunes_enclosure_source'][$key]);
       $has_filefields = TRUE;
     }
-    if (isset($form['itunes_vocabularies'][$key])) {
-      $row[] = drupal_render($form['itunes_vocabularies'][$key]);
+    if (isset($form['itunes_keyword_source'][$key])) {
+      $row[] = drupal_render($form['itunes_keyword_source'][$key]);
       $has_vocabularies = TRUE;
     }
+    $row[] = drupal_render($form['itunes_author_source'][$key]);
 
     $rows[] = $row;
   }
@@ -102,6 +139,7 @@ function theme_itunes_admin_settings($fo
   if ($has_vocabularies) {
     $header[] = t('Vocabulary for use as keywords');
   }
+  $header[] = t('Source for use as author');
 
   return theme('table', $header, $rows) . drupal_render($form);
-}
\ Pas de fin de ligne à la fin du fichier.
+}
diff -urp itunes-cvs/itunes.install itunes/itunes.install
--- itunes-cvs/itunes.install	2009-06-03 18:55:03.000000000 +0200
+++ itunes/itunes.install	2009-06-16 10:00:19.000000000 +0200
@@ -2,6 +2,11 @@
 // $Id: itunes.install,v 1.4 2009/06/03 16:55:03 drewish Exp $
 
 /**
+ * @file
+ * Installation, updates, and desinstallation of the iTunes module.
+ */
+
+/**
  * Implementation of hook_install().
  */
 function itunes_install() {
@@ -21,8 +26,9 @@ function itunes_install() {
 function itunes_uninstall() {
   drupal_uninstall_schema('itunes');
   variable_del('itunes_types');
-  variable_del('itunes_filefields');
-  variable_del('itunes_vocabularies');
+  variable_del('itunes_enclosure_source');
+  variable_del('itunes_keyword_source');
+  variable_del('itunes_author_source');
 }
 
 /**
@@ -73,3 +79,21 @@ function itunes_schema() {
   return $schema;
 }
 
+/**
+ * Rename the item source variables.
+ */
+function itunes_update_6100() {
+  $ret = array();
+
+  if ($var = variable_get('itunes_filefields', array())) {
+    variable_set('itunes_enclosure_source', $var);
+    variable_del('itunes_filefields');
+  }
+
+  if ($var = variable_get('itunes_vocabularies', array())) {
+    variable_set('itunes_keyword_source', $var);
+    variable_del('itunes_vocabularies');
+  }
+
+  return $ret;
+}
diff -urp itunes-cvs/itunes.module itunes/itunes.module
--- itunes-cvs/itunes.module	2009-06-03 19:22:28.000000000 +0200
+++ itunes/itunes.module	2009-06-16 09:59:27.000000000 +0200
@@ -4,6 +4,10 @@
 define('ITUNES_EXPLICIT_YES', 1);
 define('ITUNES_EXPLICIT_CLEAN', 2);
 
+/**
+ * @file
+ * Provides an iTunes view style for feeds.
+ */
 
 /**
  * Implementation of hook_menu().
@@ -22,7 +26,7 @@ function itunes_menu() {
 }
 
 /**
- * Implementation of hook_theme
+ * Implementation of hook_theme().
  */
 function itunes_theme() {
   return array(
@@ -152,7 +156,9 @@ function itunes_nodeapi(&$node, $op, $ar
 
       case 'rss item':
         $ret = array();
-        $fields = variable_get('itunes_filefields', array());
+
+        // File enclosure.
+        $fields = variable_get('itunes_enclosure_source', array());
         if (!empty($fields[$node->type]) && !empty($node->{$fields[$node->type]}[0]['fid'])) {
           $file = (array) $node->{$fields[$node->type]}[0];
           $ret[] = array(
@@ -173,7 +179,8 @@ function itunes_nodeapi(&$node, $op, $ar
           }
         }
 
-        $vocabs = variable_get('itunes_vocabularies', array());
+        // Keyword tags.
+        $vocabs = variable_get('itunes_keyword_source', array());
         if (!empty($vocabs[$node->type])) {
           $keywords = array();
           foreach ($node->taxonomy as $tid => $term) {
@@ -190,12 +197,32 @@ function itunes_nodeapi(&$node, $op, $ar
           }
         }
 
-        $ret[] = array(
-          'namespace' => array('xmlns:itunes' => 'http://www.itunes.com/dtds/podcast-1.0.dtd'),
-          'key' => 'itunes:author',
-          'value' => $node->name,
-        );
+        // Author.
+        $author_source = variable_get('itunes_author_source', array());
+        if (!empty($author_source[$node->type])) {
+          if ($author_source[$node->type] == 'node_author') {
+            $author = $node->name;
+          }
+          else {
+            $author_field = $node->$author_source[$node->type];
+            if (!empty($author_field[0]['safe'])) {
+              $author = $author_field[0]['view'];
+            }
+            elseif (!empty($author_field[0]['view'])) {
+              foreach ($author_field as $authors) {
+                $authors_view[] = strip_tags(($authors['view']));
+              }
+              $author = implode($authors_view, ', ');
+            }
+          }
+          $ret[] = array(
+            'namespace' => array('xmlns:itunes' => 'http://www.itunes.com/dtds/podcast-1.0.dtd'),
+            'key' => 'itunes:author',
+            'value' => $author,
+          );
+        }
 
+        // Remaining elements.
         if (!empty($node->itunes)) {
           $ret[] = array(
             'namespace' => array('xmlns:itunes' => 'http://www.itunes.com/dtds/podcast-1.0.dtd'),
@@ -238,7 +265,7 @@ function itunes_explicit($value) {
 /**
  * Get an array with the iTunes podcast categories.
  *
- * @see http://www.apple.com/itunes/whatson/podcasts/specs.html#categories
+ * See http://www.apple.com/itunes/whatson/podcasts/specs.html#categories
  */
 function itunes_categories() {
   return array(
diff -urp itunes-cvs/itunes_plugin_style_rss.inc itunes/itunes_plugin_style_rss.inc
--- itunes-cvs/itunes_plugin_style_rss.inc	2009-06-03 18:55:03.000000000 +0200
+++ itunes/itunes_plugin_style_rss.inc	2009-06-16 10:03:19.000000000 +0200
@@ -98,7 +98,7 @@ class itunes_plugin_style_rss extends vi
       );
       foreach ($children as $second_level) {
         $category_options[] = (object) array(
-          'option' => array($top_level . '|' . $second_level => ' - ' . $second_level)
+          'option' => array($top_level .'|'. $second_level => ' - '. $second_level)
         );
       }
     }
@@ -143,7 +143,7 @@ class itunes_plugin_style_rss extends vi
       }
       else {
         $url = parse_url($form_state['values']['style_options']['image_url']);
-        $ext = strtolower(pathinfo($url['path'], PATHINFO_EXTENSION));
+        $ext = drupal_strtolower(pathinfo($url['path'], PATHINFO_EXTENSION));
         if (!isset($url['path']) || ($ext != 'jpg' && $ext != 'png')) {
           form_set_error('image_url', t('The URL must specify a file ending with <code>.jpg</code> or <code>.png</code>.'));
         }
@@ -247,4 +247,4 @@ class itunes_plugin_style_rss extends vi
 
     return $extra;
   }
-}
\ Pas de fin de ligne à la fin du fichier.
+}
diff -urp itunes-cvs/itunes.views_default.inc itunes/itunes.views_default.inc
--- itunes-cvs/itunes.views_default.inc	2008-12-24 21:22:39.000000000 +0100
+++ itunes/itunes.views_default.inc	2009-06-16 10:05:01.000000000 +0200
@@ -2,6 +2,11 @@
 // $Id: itunes.views_default.inc,v 1.1 2008/12/24 20:22:39 drewish Exp $
 
 /**
+ * @file
+ * Default iTunes view.
+ */
+
+/**
  * Implementation of hook_views_default_views().
  */
 function itunes_views_default_views() {
@@ -79,7 +84,7 @@ function itunes_views_default_views() {
     'title' => '',
     'weight' => 0,
   ));
-   $views[$view->name] = $view;
+  $views[$view->name] = $view;
 
   return $views;
-}
\ Pas de fin de ligne à la fin du fichier.
+}
diff -urp itunes-cvs/itunes.views.inc itunes/itunes.views.inc
--- itunes-cvs/itunes.views.inc	2008-12-24 20:30:27.000000000 +0100
+++ itunes/itunes.views.inc	2009-06-16 10:02:03.000000000 +0200
@@ -1,4 +1,10 @@
 <?php
+// $Id$
+
+/**
+ * @file
+ * Views includes.
+ */
 
 /**
  * Implementation of hook_views_plugins().
@@ -19,4 +25,4 @@ function itunes_views_plugins() {
       ),
     ),
   );
-}
\ Pas de fin de ligne à la fin du fichier.
+}
