1) What is the way to remove the links m3u pls xpsf that appear at the bottom of the extended player? 2) What is the merit and demerit of removing the links? One merit that I see is the user can download a playlist and play the audio in any player on his local machine.

Comments

zirafa’s picture

The links are generated with a theme function in audio_playlist (i think). Overriding that in the theme layer should get rid of it.

wisdom’s picture

Category: bug » support
kevinsmith’s picture

Looks like you want to add the following to your template.php file in the theme folder:

/**
 *  Theme function to handle the XSPF view
 */
function phptemplate_audio_feeds_views_xspf($view, $nodes, $type) {
  if (isset($_GET['xspf'])) {
    return audio_feeds_views_prepare_xspf(views_get_title($view, $type), url($view->real_url, null, null, true), $nodes);
  }
  elseif (isset($_GET['m3u'])) {
    return theme('audio_feeds_views_m3u', $view, $nodes, $type);
  }
  elseif (isset($_GET['pls'])) {
    return theme('audio_feeds_views_pls', $view, $nodes, $type);
  }
  else {
    $player = audio_get_players('name', variable_get('audio_feeds_default_player', 'xspf_extended'));
    $query_string = array();
    if ($_GET) {
      foreach ($_GET as $key => $value) {
        // filter out the standard drupal q string, leaving everything else
        if ($key != 'q') {
          $query_string[$key] = $value;
        }
      }
    }
    $filters = $query_string ? audio_feeds_query_string_encode($query_string) .'%26xspf' : 'xspf';
    $playlist_url = url($view->real_url, $filters, NULL, TRUE);
    $output = theme($player['theme_xspf'], $playlist_url);
    return $output;
  }
}

This is essentially the same as the default theming for the extended player feed, but with

$output .= theme('audio_feeds_views_links', $view, $query_string);

removed.

zirafa’s picture

Priority: Critical » Minor
Status: Active » Fixed

An even simpler answer: you can just override the theme_audio_feeds_views_links to show nothing.

/**
 * Suppress playlist links
 */
function  phptemplate_audio_feeds_views_links($view, $query_string) {
 // do nothing
}
Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

anthonym’s picture

Zirafa,

Where exactly would I put this code? I tried putting it in my template.php file, but it didn't remove the links.

anthonym’s picture

Status: Closed (fixed) » Postponed (maintainer needs more info)
anthonym’s picture

Version: 5.x-1.3 » 5.x-2.x-dev
Priority: Minor » Normal

Another question on this topic: it looks like the feed links on a node with audio files attached (playlist) and those created by the playlist view type are not the same. The ones that appear at the bottom of a node are in all caps while the ones in the view are lowercase. Is there one way to remove them both or two different methods?

zirafa’s picture

Status: Postponed (maintainer needs more info) » Fixed

#6) For more information on overriding theme functions see: http://drupal.org/node/11811
#8) They are separately generated. You should be able to fix it with CSS or override the theme function to modify it.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.