Project:XSPF Playlist
Version:5.x-1.14
Component:Code
Category:feature request
Priority:normal
Assigned:arthurf
Status:closed (fixed)

Issue Summary

Here is a patch for supporting audio files from nodes created with the audio module.
It works for both the xpsf/node/$nid playlist (though there's not much point, as you get a playlist of only one file), and for views.

The patch is against the current release, 5.x-1.14, as I need this on a production site and the CVS HEAD looks like a lot of changes have happened. It's merely some extra options in one function and a whole new handler function, so should be adaptable to HEAD.

AttachmentSize
xspf_playlist_audio_support.patch1.32 KB

Comments

#1

Sorry, got my version numbers mixed up. The patch is on 5.x-0.12.

#2

I'll check this out and apply it as I can. Thanks so much for offering this- I'm really psyched to support more modules.

#3

Ok, I checked this out and the only thing different that I'd suggest is why not put this in the audio module instead of putting core support for audio into xspf? Since the hook system is in place, it seems like that might be a better place for it- what do you think?

Here's the rough code:

<?php
/**
* implemenation of hook_xspf_playlist_use
* @param string $op
* @param object $node
* @param array $config
*/
function audio_xspf_playlist_use($op, $node, $config) {
  switch(
$op) {
    case
'define' :
       
$define['audio--1'] = t('Use audio node file');
      return
$define;
    break;

    case
'return':
      if (
$config == 1) {
        if (
$item = xspf_playlist_create_file_item($node, xspf_playlist_url($node->audio_file->filepath))) {
         
$items[] =  $item;
          return
$items;
        }
      }
   break;
  }
}
?>

#4

I guess it depends on which way round you envisage the modules as sitting in an imaginary stack...
I figure audio comes first since it supplies the actual nodes, as xpsf sits above that as it provides a way of outputting them.
Also, 5.x releases of audio module are kind of lagging -- work there is concentrating on 6 AFAIK. So it would be more expedient in terms of getting this feature out to users to have it here.

#5

Assigned to:Anonymous» arthurf
Status:needs review» fixed

Given your comments about development on the 5 branch, I'll just make a module inside of XSPF for this. It is now in CVS and will be released with the next release. Thanks for suggesting this!

#6

Status:fixed» closed (fixed)

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

nobody click here