diff -urpN xspf_playlist_orig/xspf_playlist_node/xspf_playlist_node.module xspf_playlist_new/xspf_playlist_node/xspf_playlist_node.module
--- xspf_playlist_orig/xspf_playlist_node/xspf_playlist_node.module	2009-04-07 18:01:45.000000000 +0100
+++ xspf_playlist_new/xspf_playlist_node/xspf_playlist_node.module	2009-04-07 17:18:45.000000000 +0100
@@ -560,6 +560,7 @@ function xspf_playlist_node_thumb_get_al
       list ($module_name, $seperator, $config) = split('[--]', $module);
       // invoke the thumbnail hook
       if (module_exists($module_name)) {
+        
         if ($thumb = module_invoke($module_name, 'xspf_playlist_thumbnail', 'return', $node, $config)) {
           // some modules may pass back multiple items
           if (is_array($thumb)) {
@@ -600,169 +601,3 @@ function xspf_playlist_node_thumbs($node
   $thumbs[0] = t('Default');
   return $thumbs;
 }
-
-
-/* *********************************************************** */
-/* Views support                                               */
-/* *********************************************************** */
-
-/**
- * define xspf_playlist filter
- *
- * @return array of tables
- */
-function xspf_playlist_node_views_tables() {
-  // define the tables
-  $tables['xspf_playlist'] = array(
-    'filters' => array(
-      'playlist' => array(
-        'name' => t('XSPF Playlist: node has playlist content'),
-        'sortable' => FALSE,
-        'notafield' => TRUE,
-        'handler' => 'views_handler_xspf_playlist_node_filter',
-        'list' => array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10),
-        'value' => 'list',
-        'operator' => array('=' => 'Equals'),
-        'help' => t('Filter nodes if they have a playlist. Use 0 to return all items on the playlist.'),
-      ),
-    ),
-  );
-  return $tables;
-}
-
-
-/**
- * build the joins for the xspf playlist filter. Calls all modules that implement
- * the hook and then builds a join statement frm them
- *
- * @param string $op
- * @param array $filter
- * @param unknown_type $filterinfo
- * @param object $query
- */
-function views_handler_xspf_playlist_node_filter($op, $filter, $filterinfo, &$query) {
-  // get all the queries that have been implemented.
-  $conditions = xspf_playlist_extend('xspf_playlist_use', 'views', null, null);
-
-  if ($conditions) {
-    // go through each of the queries to create an clause
-    foreach ($conditions as $condition) {
-      // get table name for this table
-      $tablename = $query->get_table_name($condition['tablename'], $num);
-      $query->add_table($tablename, false, 1, array('left' => array('table' => 'node', 'field' => 'nid'), 'right' => array('field' => 'nid')));
-      $where[] = sprintf($condition['conditions'], $tablename);
-    }
-    // take all the condtions and merge them into an array
-    $query->add_where(implode(' OR ', $where));
-  }
-}
-
-
-/**
- * Provide views plugins for the feed types we support.
- */
-function xspf_playlist_node_views_style_plugins() {
-  return array(
-    'xspf_playlist_node' => array(
-      'name' => t('XSPF Playlist node feed'),
-      'theme' => 'xspf_playlist_node_feed',
-      'needs_table_header' => TRUE,
-      'needs_fields' => TRUE,
-      'even_empty' => TRUE,
-    ),
-  );
-}
-
-/**
- * post view for our own op -- mimics the feed selector
- */
-function xspf_playlist_node_views_post_view($view, $items, $output) {
-  foreach ($view->argument as $id => $argument) {
-    if ($argument['type'] == 'xspf') {
-      return xspf_playlist_node_views_feed_argument('post_view', $view, 'rss_feed');
-    }
-  }
-}
-
-/**
- * Implementation of hook_views_feed_argument
- * When a view has the 'Node: Feed Selector' argument present, * an value of 'xspf' in this argument will produce an XSPF playlist
- * @param string $op
- * @param object $view
- * @param array $arg
- * @param array $argdata
- */
-function xspf_playlist_node_views_feed_argument($op, &$view, $arg, $argdata = null) {
-  if ($op == 'argument' && $arg == 'xspf') {
-    // set the page type
-    $view->page_type = 'xspf_playlist_node';
-
-    // @ TODO modify the playlist here to support these options
-    if ($argdata['options']) {
-      $view->description = $argdata['options'];
-    }
-
-    // reset the 'real url' to the URL without the feed argument.
-    $view_args = array();
-    $max = count($view->args);
-    foreach ($view->args as $id => $view_arg) {
-      ++$count;
-      if ($view_arg == $arg && $view->argument[$id]['id'] == $argdata['id']) {
-        if ($count != $max) {
-          $view_args[] = $argdata['wildcard'];
-        }
-      }
-      else {
-        $view_args[] = $view_arg;
-      }
-    }
-    $view->feed_url = views_get_url($view, $view_args);
-  }
-}
-
-
-/**
- * Views plugin that displays an xspf playlist.
- */
-function theme_xspf_playlist_node_feed($view, $results, $type) {
-  if ($type == 'block') {
-    return;
-  }
-  global $base_url;
-
-  // do we have a limit on the number of tracks to return per node?
-  // itterate through the filters to find the limit value
-  foreach ($view->filter as $filter) {
-    if ($filter['field'] == 'xspf_playlist.playlist') {
-      if ($filter['value']) {$limit = $filter['value']; }
-    }
-  }
-
-  $items = array();
-  // loop through the incoming results
-  foreach ($results as $result) {
-
-    // Load the specified node:
-    $node = node_load($result->nid);
-
-    // convert nodes to items
-    if ($item = xspf_playlist_node_items($node, $limit)) {
-      $items = array_merge($items, $item);
-    }
-
-  }
-
-  $playlist = array(
-    'title' => filter_xss_admin(views_get_title($view, 'page')),
-    'annotation' => filter_xss_admin($view->description),
-    'link' => url($base_url, array('absolute' => TRUE)),
-    'items' => $items,
-  );
-
-  xspf_playlist_render($playlist, 'view', NULL, $view);
-
-  // Explicitly exit. This action is needed because otherwise Views rendering
-  // will output HTML.
-  module_invoke_all('exit');
-  exit;
-}
\ No newline at end of file
diff -urpN xspf_playlist_orig/xspf_playlist_views/theme/theme.inc xspf_playlist_new/xspf_playlist_views/theme/theme.inc
--- xspf_playlist_orig/xspf_playlist_views/theme/theme.inc	1970-01-01 01:00:00.000000000 +0100
+++ xspf_playlist_new/xspf_playlist_views/theme/theme.inc	2009-04-07 17:39:47.000000000 +0100
@@ -0,0 +1,60 @@
+<?php
+// $Id$
+
+/**
+ * @file theme.inc
+ *
+ * An array of preprocessors to fill variables for templates and helper
+ * functions to make theming easier.
+ */
+
+/**
+ * Preprocess an RSS feed
+ */
+function template_preprocess_xspf_playlist_views_view_xspf_playlist(&$vars) {
+  global $base_url;
+  global $language;
+
+  $view     = &$vars['view'];
+  $options  = &$vars['options'];
+  $items    = &$vars['rows'];
+
+  $style    = &$view->style_plugin;
+
+  $vars['annotation'] = check_plain(decode_entities(strip_tags($options['annotation'])));
+  $vars['title'] = check_plain($view->get_title());
+
+  // Figure out which display which has a path we're using for this feed. If there isn't
+  // one, use the global $base_url
+  $link_display_id = $view->display_handler->get_link_display();
+  if ($link_display_id && !empty($view->display[$link_display_id])) {
+    $path = $view->display[$link_display_id]->handler->get_path();
+  }
+
+  if ($path) {
+    $path = $view->get_url(NULL, $path);
+    $url_options = array('absolute' => TRUE);
+    if (!empty($view->exposed_raw_input)) {
+      $url_options['query'] = $view->exposed_raw_input;
+    }
+
+    // Compare the link to the default home page; if it's the default home page, just use $base_url.
+    if ($path == variable_get('site_frontpage', 'node')) {
+      $path = '';
+    }
+
+    $vars['link'] = check_url(url($path, $url_options));
+  }
+
+  $vars['langcode'] = check_plain($language->language);
+  $vars['namespaces'] = drupal_attributes($style->namespaces);
+  $vars['items'] = $items;
+
+  drupal_set_header('Content-Type: text/xml; charset=utf-8');
+}
+
+/**
+ * Default theme function for all RSS rows.
+ */
+function template_preprocess_xspf_playlist_views_view_row_node_xspf_playlist(&$vars) {
+}
diff -urpN xspf_playlist_orig/xspf_playlist_views/theme/xspf-playlist-views-view-row-node-xspf-playlist.tpl.php xspf_playlist_new/xspf_playlist_views/theme/xspf-playlist-views-view-row-node-xspf-playlist.tpl.php
--- xspf_playlist_orig/xspf_playlist_views/theme/xspf-playlist-views-view-row-node-xspf-playlist.tpl.php	1970-01-01 01:00:00.000000000 +0100
+++ xspf_playlist_new/xspf_playlist_views/theme/xspf-playlist-views-view-row-node-xspf-playlist.tpl.php	2009-04-07 17:39:54.000000000 +0100
@@ -0,0 +1,14 @@
+<?php
+// $Id$
+
+/**
+ * @file xspf-playlist-views-view-row-node-xspf-playlist.tpl.php
+ * Default view template to display a item in an XSPF playlist.
+ *
+ * @ingroup views_templates
+ */
+
+?>
+<?php foreach($row as $item): ?>
+  <?php print format_xml_elements($item); ?>
+<?php endforeach; ?>
\ No newline at end of file
diff -urpN xspf_playlist_orig/xspf_playlist_views/theme/xspf-playlist-views-view-xspf-playlist.tpl.php xspf_playlist_new/xspf_playlist_views/theme/xspf-playlist-views-view-xspf-playlist.tpl.php
--- xspf_playlist_orig/xspf_playlist_views/theme/xspf-playlist-views-view-xspf-playlist.tpl.php	1970-01-01 01:00:00.000000000 +0100
+++ xspf_playlist_new/xspf_playlist_views/theme/xspf-playlist-views-view-xspf-playlist.tpl.php	2009-04-07 17:16:27.000000000 +0100
@@ -0,0 +1,20 @@
+<?php
+// $Id$
+/**
+ * @file xspf-playlist-views-view-xspf-playlist.tpl.php
+ * Default view template to display a an XSPF playlist.
+ *
+ * @ingroup views_templates
+ */
+?>
+<?php print "<?xml"; ?> version="1.0" encoding="utf-8" <?php print "?>"; ?>
+
+<playlist version="0" <?php print $namespaces; ?>>
+  <title><?php print $title; ?></title>
+  <link><?php print $link; ?></link>
+  <info><?php print $info; ?></info>
+  <annotation><?php print $annotation; ?></annotation>
+  <trackList>
+<?php print $items; ?>
+  </trackList>
+</playlist>
\ No newline at end of file
diff -urpN xspf_playlist_orig/xspf_playlist_views/views/xspf_playlist_views_handler_filter_has_playlist.php xspf_playlist_new/xspf_playlist_views/views/xspf_playlist_views_handler_filter_has_playlist.php
--- xspf_playlist_orig/xspf_playlist_views/views/xspf_playlist_views_handler_filter_has_playlist.php	1970-01-01 01:00:00.000000000 +0100
+++ xspf_playlist_new/xspf_playlist_views/views/xspf_playlist_views_handler_filter_has_playlist.php	2009-04-07 17:16:40.000000000 +0100
@@ -0,0 +1,33 @@
+<?php
+// $Id: flag_handler_filter_flagged.inc,v 1.1.2.5 2008/12/03 14:10:00 mooffie Exp $
+
+/**
+ * @file
+ * Contains the flagged content filter handler.
+ */
+
+/**
+ * Handler to filter for content that has not been flagged.
+ *
+ * @ingroup views
+ */
+class xspf_playlist_views_handler_filter_has_playlist extends views_handler_filter_boolean_operator {
+  function options(&$options) {
+    parent::options($options);
+    $options['value'] = 1;
+  }
+
+  function options_form(&$form, &$form_state) {
+    parent::options_form($form, $form_state);
+    $form['value']['#type'] = 'radios';
+    $form['value']['#title'] = t('Status');
+    $form['value']['#options'] = array(1 => t('Has XSPF playlist'), 0 => t('Does not have XSPF playlist'));
+    $form['value']['#default_value'] = empty($this->options['value']) ? 0 : $this->options['value'];
+    $form['value']['#description'] = '<p>' . t('Filter nodes if they have a playlist. Use 0 to return all items on the playlist..') . '</p>';
+  }
+
+  function query() {
+    $operator = $this->value ? 'IS NOT' : 'IS';
+    $this->query->add_where($this->options['group'], $this->relationship .'.uid '. $operator .' NULL');
+  }
+}
diff -urpN xspf_playlist_orig/xspf_playlist_views/views/xspf_playlist_views_plugin_row_node_xspf_playlist.inc xspf_playlist_new/xspf_playlist_views/views/xspf_playlist_views_plugin_row_node_xspf_playlist.inc
--- xspf_playlist_orig/xspf_playlist_views/views/xspf_playlist_views_plugin_row_node_xspf_playlist.inc	1970-01-01 01:00:00.000000000 +0100
+++ xspf_playlist_new/xspf_playlist_views/views/xspf_playlist_views_plugin_row_node_xspf_playlist.inc	2009-04-07 17:28:51.000000000 +0100
@@ -0,0 +1,36 @@
+<?php
+// $Id: views_plugin_row_node_rss.inc,v 1.4 2009/01/09 17:16:34 merlinofchaos Exp $
+/**
+ * @file
+ * Contains the node RSS row style plugin.
+ */
+
+/**
+ * Plugin which performs a node_view on the resulting object
+ * and formats it as an RSS item.
+ */
+class xspf_playlist_views_plugin_row_node_xspf_playlist extends views_plugin_row {
+  function option_definition() {
+    $options = parent::option_definition();
+    return $options;
+  }
+
+  function render($row) {
+    // For the most part, this code is taken from node_feed() in node.module
+    global $base_url;
+
+    // Load the specified node:
+    $node = node_load($row->nid);
+    $node->build_mode = NODE_BUILD_RSS;
+
+    // convert the node to playlist items
+    if (!$item = xspf_playlist_node_items($node)) {
+      return; // could not generate a playlist item from the node
+    }
+
+    // set the namespace
+    $this->view->style_plugin->namespaces = array('xmlns' => 'http://xspf.org/ns/0/');
+
+    return theme($this->theme_functions(), $this->view, $this->options, $item);
+  }
+}
diff -urpN xspf_playlist_orig/xspf_playlist_views/views/xspf_playlist_views_plugin_style_xspf_playlist.inc xspf_playlist_new/xspf_playlist_views/views/xspf_playlist_views_plugin_style_xspf_playlist.inc
--- xspf_playlist_orig/xspf_playlist_views/views/xspf_playlist_views_plugin_style_xspf_playlist.inc	1970-01-01 01:00:00.000000000 +0100
+++ xspf_playlist_new/xspf_playlist_views/views/xspf_playlist_views_plugin_style_xspf_playlist.inc	2009-04-07 17:16:58.000000000 +0100
@@ -0,0 +1,99 @@
+<?php
+// $Id$
+
+/**
+ * @file
+ * XSPF playlist style plugin.
+ */
+
+/**
+ * Default style plugin to render an XSPF playlist.
+ *
+ * @ingroup views_style_plugins
+ */
+class xspf_playlist_views_plugin_style_xspf_playlist extends views_plugin_style {
+  function attach_to($display_id, $path, $title) {
+    $display = $this->view->display[$display_id]->handler;
+    $url_options = array();
+    $input = $this->view->get_exposed_input();
+    if ($input) {
+      $url_options['query'] = $input;
+    }
+
+    $url = url($this->view->get_url(NULL, $path), $url_options);
+    if ($display->has_path()) {
+      if (empty($this->preview)) {
+        drupal_add_feed($url, $title);
+      }
+    }
+    else {
+      if (empty($this->view->feed_icon)) {
+        $this->view->feed_icon = '';
+      }
+
+      $this->view->feed_icon .= theme('feed_icon', $url, $title);
+      drupal_add_link(array(
+        'rel' => 'alternate',
+        'type' => 'application/xspf+xml',
+        'title' => $title,
+        'href' => $url
+      ));
+    }
+  }
+
+  function option_definition() {
+    $options = parent::option_definition();
+
+    $options['annotation'] = array('default' => '', 'translatable' => TRUE);
+
+    return $options;
+  }
+
+  function options_form(&$form, &$form_state) {
+    $form['annotation'] = array(
+      '#type' => 'textfield',
+      '#title' => t('Annotation'),
+      '#default_value' => $this->options['annotation'],
+      '#description' => t('This will appear in the XSPF feed itself.'),
+      '#process' => array('views_process_dependency'),
+      '#dependency' => array('edit-style-options-override' => array(FALSE)),
+    );
+  }
+
+  /**
+   * Return an array of additional XHTML elements to add to the channel.
+   *
+   * @return
+   *   An array that can be passed to format_xml_elements().
+   */
+  function get_channel_elements() {
+    return array();
+  }
+
+  function render() {
+    if (empty($this->row_plugin)) {
+      vpr('views_plugin_style_default: Missing row plugin');
+      return;
+    }
+    $rows = '';
+
+    // This will be filled in by the row plugin and is used later on in the
+    // theming output.
+    $this->namespaces = array();
+
+    // Fetch any additional elements for the channel and merge in their
+    // namespaces.
+    $this->channel_elements = $this->get_channel_elements();
+    foreach ($this->channel_elements as $element) {
+      if (isset($element['namespace'])) {
+        $this->namespaces = array_merge($this->namespaces, $element['namespace']);
+      }
+    }
+
+    foreach ($this->view->result as $row) {
+      $rows .= $this->row_plugin->render($row);
+    }
+
+    return theme($this->theme_functions(), $this->view, $this->options, $rows);
+  }
+}
diff -urpN xspf_playlist_orig/xspf_playlist_views/views/xspf_playlist_views.views.inc xspf_playlist_new/xspf_playlist_views/views/xspf_playlist_views.views.inc
--- xspf_playlist_orig/xspf_playlist_views/views/xspf_playlist_views.views.inc	1970-01-01 01:00:00.000000000 +0100
+++ xspf_playlist_new/xspf_playlist_views/views/xspf_playlist_views.views.inc	2009-04-07 17:25:16.000000000 +0100
@@ -0,0 +1,80 @@
+<?php
+// $Id$
+
+/**
+ * @file
+ * Provides XSPF playlist support for the Views module.
+ */
+
+/**
+ * Implementation of hook_views_plugins
+ */
+function xspf_playlist_views_views_plugins() {
+  $path = drupal_get_path('module', 'xspf_playlist_views');
+  return array(
+    'module' => 'xspf_playlist_views',
+    'style' => array(
+      'xspf_playlist' => array(
+        'title' => t('XSPF Playlist'),
+        'help' => t('Generates an XSPF playlist from a view.'),
+        'handler' => 'xspf_playlist_views_plugin_style_xspf_playlist',
+        'path' => "$path/views",
+        'theme' => 'xspf_playlist_views_view_xspf_playlist',
+        'theme path' => "$path/theme",
+        'theme file' => 'theme.inc', 
+        'uses row plugin' => TRUE,
+        'uses options' => TRUE,
+        'type' => 'feed',
+      ),
+    ),
+    'row' => array(
+      'node_xspf_playlist' => array(
+        'title' => t('Node XSPF'),
+        'help' => t('Display the node with standard node view.'),
+        'handler' => 'xspf_playlist_views_plugin_row_node_xspf_playlist',
+        'path' => "$path/views",
+        'theme' => 'xspf_playlist_views_view_row_node_xspf_playlist',
+        'theme path' => "$path/theme",
+        'theme file' => 'theme.inc', 
+        'base' => array('node'), // only works with 'node' as base.
+        'uses options' => FALSE,
+        'type' => 'feed',
+      ),
+    ),
+  );
+}
+
+/**
+ * Implementation of hook_views_handlers().
+ */
+/*function xspf_playlist_views_views_handlers() {
+  return array(
+    'handlers' => array(
+      'xspf_playlist_views_handler_filter_has_playlist' => array(
+        'parent' => 'views_handler_filter_boolean_operator',
+      ),
+    ),
+  );
+}*/
+
+/**
+ * Implementation of hook_views_data().
+ */
+/*function xspf_playlist_views_views_data() {
+  $data = array();
+  
+  $data['xspf_playlist_thumb']['table']['group'] = t('XSPF Playlist');
+
+  // Specialized is null/is not null filter.
+  $data['xspf_playlist_thumb']['has_playlist'] = array(
+  	'field' => array(
+        'title' => t('Has XSPF playlist.'),
+        'help' => t('Filter to ensure content has or does not have an XSPF playlist.'),
+  		'views_handler_field_node',
+    ),
+    'filter' => array(
+        'handler' => 'xspf_playlist_views_handler_filter_has_playlist',
+    ),
+  );
+  return $data;
+}*/
\ No newline at end of file
diff -urpN xspf_playlist_orig/xspf_playlist_views/xspf_playlist_views.info xspf_playlist_new/xspf_playlist_views/xspf_playlist_views.info
--- xspf_playlist_orig/xspf_playlist_views/xspf_playlist_views.info	1970-01-01 01:00:00.000000000 +0100
+++ xspf_playlist_new/xspf_playlist_views/xspf_playlist_views.info	2009-04-07 17:22:26.000000000 +0100
@@ -0,0 +1,7 @@
+; $Id:$
+name = "XSPF Playlist Views"
+description = "Integrates XSPF playists into Views."
+package = "Media"
+dependencies[] = xspf_playlist_node
+dependencies[] = views
+core = 6.x
\ No newline at end of file
diff -urpN xspf_playlist_orig/xspf_playlist_views/xspf_playlist_views.module xspf_playlist_new/xspf_playlist_views/xspf_playlist_views.module
--- xspf_playlist_orig/xspf_playlist_views/xspf_playlist_views.module	1970-01-01 01:00:00.000000000 +0100
+++ xspf_playlist_new/xspf_playlist_views/xspf_playlist_views.module	2009-04-07 17:19:30.000000000 +0100
@@ -0,0 +1,11 @@
+<?php 
+
+/**
+ * Implementation of hook_views_api().
+ */
+function xspf_playlist_views_views_api() {
+  return array(
+   'api' => 2,
+   'path' => drupal_get_path('module', 'xspf_playlist_views') .'/views',
+  );
+}
\ No newline at end of file
