Outlined here is a plan to migrate the playlist module's functionality into audio module contrib.

Reasons:

1) Playlist Relationship API duplicates and clutters other node relation efforts.

The current playlist module consists of playlist.module and audio_playlist.module. Playlist.module was supposed to be a relationship API for media files. However we must realize that there are many existing relationship APIs in drupal and they all do a similar thing. A universal relationship API is a better solution than many modules doing the same thing. I don't feel it's worth developing out yet another relationship API with such limited scope.

The Playlist API is not being utilized by any other modules (that I know of). This module has pretty much only ever been used for audio playlists. I think it's safe to cut this API out to simplify things.

2) Current functionality is not modular enough.

When this module was first written, it was conceived to do a few things - create audio XML feeds, store playlist metadata, and provide an interface for managing lists of audio files. However, all of this functionality was mostly bundled into audio_playlist.module which was meant to deal only with audio playlists. Trying to do all of this in one module was kind of clunky since it had to deal with data storage, interface design, and feed generation all at once. It also meant the code was all interweaved together, making it hard to maintain and inflexible if you wanted to mix and match functionality.

The Way Forward

Nobody can predict the changes that will happen in Drupal, but I think it's always a good idea to try and at least plan for the future. I know that more modularity is always a better design choice, as it reduces the amount of code that needs to be maintained, and conceptually breaks down a large problem into smaller pieces. I also know that personally I have much less time to work on this than I did two years ago. I would like to think that modularizing things will make it easier for me and others to handle the work in the future.

Conceptually I'd like to break functionality up as follows:

Audio_attach.module *COMPLETE*

Update the existing audio_attach contrib module to allow a user to attach multiple audio files to any node type and re-order them. This is the first thing that needs to get done.

Audio_feeds.module *COMPLETE*

This would provide XSPF, M3U, and PLS audio feeds for a list of audio files, either created by audio_attach.module or by views.

Audio_itunes.module *COMPLETE Check here*

Many people just want the ability to create and control iTunes compatible podcasts. To do this you need a way to store the podcast metadata for the feed, which this module would handle. This module would act upon a list of audio files generated by views.

Audio_playlist.module *COMPLETE*

This adds an "Add to playlist" link to every audio node so that people can add any audio file to a list of attached files.

Even Further into the Future

With such modularity, it is easier now to create an audio_album.module which would let you create specialized album node types where you could attach audio files. Or you could create different types of playlists with different access permissions.

Please post any comments or questions here. An upgrade path to this new method is also something we'll need to consider as we move forward.

I appreciate everyone's patience as this module gets sorted out.
Open source development ALWAYS tests your patience ;)

Thanks!
zirafa

Comments

elio’s picture

I would like to notice that I made use of playlist API for developing Image playlists , I liked the idea of making a node to hold the relations and connections of other nodes, currently toxonomies approach has several limitations. I can mantain, If playlist API will be released, other modules based on it (image and video playlist), We can extend the playlist relations to hold relations between playlist.
For further discussion I can show some use cases that can not be covered with other relations mechanisms.

Elio Scordo

elio’s picture

Dear Zirafa,

I will waint to know about your intentions, especilly beacause I have to migrate stuff to 5 release so if it will not be anymore the playlst api and audio playlist I will have to change my plans...

Sicerely ,
Elio

zirafa’s picture

Elio!

That is some cool stuff. I had no idea you had built such a thing. How come it is not a project on Drupal.org? :) That's probably why I didn't hear about it.

Elio,there are already several node-to-node relationship schemas floating around drupal.org. Can you make a good case for why the playlist API is better or how it could co-exist with these others (arguable more general and flexible) schemas? Or how it is better than just having a separate table for each playlist relationship type?

elio’s picture

Thank You Zirafa! I just extended your pretty good work, but I didn't feel like to put on drupal the modules because I still have to test many things. It would be nice to release some modules as contribute.
I'm not so informed about other releation node to node modules, please forward me some link about, furthermore for media documents playlist api seems ok, comparing with the taxonomy approach, I couldn't find a way (without extending the module), to retreive the creator of the taxonomy term, so I couldn't make a personal playist page. For categorizing the relation between nodes there are the relation beetween term but I don't like in this case (do you think is a way?), making some custom processing using a module over to a specific vocabulary reduce the dynamical extendibility of the taxonomy approach.
I didnt use the "attach" to node way or other, How is it ? May be we can develop on other API (playlist was quite confortable), I hope we can develop a common solution and extend with many functionality fast media document processing and visualizing in drupal.

Sincerely,
Elio Scordo

ohzbees’s picture

I like the plans for modularizing the code to facilitate its flexible application. I have always wanted to be able to stream even a single audio file from a node. Linking in with Views seems to be the best approach for managing the presentation of audio node elements in list or tabular formats (e.g., stream, play, download link, number of hits, creation time, etc.)

Great work.

--Neil

zirafa’s picture

In case people want to follow the progress of these modules, I've got the development versions up here in my sandbox.

zirafa’s picture

And here are the issues for each module:

Audio Attach Issue
Audio Feeds Issue

newdru’s picture

Ziafra, This is a carry over from my poste here http://drupal.org/node/110960

So it looks like the playlist is yet to be started. I don't see any code in your cvs directory posted for the playlist.

Would it be too much to ask the status of the playlist?

1) any idea when it *might* be available for testing? (note i'm not holding you to any date, just trying to get a rough estimate so i can figure out if i should look for another option or possibly help in some way).

2) where are you in the development process - are you still trying to figure out *how* you want to implement it or are you actually coding it now? (i ask because there is some discourse between you and elio here about implementation which leads me to believe that part isn't addressed yet)

3) regarding elio. did you like his approach? has he made his code available? I'd be willing to look at and even use that for 5.0 as an interim solution?

thanks for the prompt response on the other thread

newdru’s picture

very dumb question probably..

your sandbox is cvs based. is there anyway to pull these modules on a regular basis all tarred up as a single download. i'm working on a windows box and i'd prefer to not have to setup cvs right now.. or copy paste every file out of that sandbox.

alternatively, if i must use cvs can you post the basic anonymous command i need to access and dl your sandbox using cvs?

thanks

zirafa’s picture

Elio was concerned that playlists wouldn't be stored as node-node relations, but they still will be stored that way. In fact, conceptually this module isn't changing much at all. What people seem to be freaking out about is the fact that things are being renamed and split up. At the end of the day, the idea is that if you turn on all these modules you achieve the same as the old playlist module:

1) upload/attach audio nodes to other nodes
2) generate XML feeds for each playlist

The plan is basically layed out, it just needs to be coded. I haven't found much time to work on this lately...

zirafa’s picture

Also, I can try and post a zipped file in my sandbox with all the modules in it so you don't have to CVS checkout.

newdru’s picture

#11

I bit the bullet and used wincvs.. Posting zip files up there would probably be cool but more of a pain for you unless you can automate it so that it recreates teh zip files every time you make a change up there.

#10

I'm not sure people are freaking out. For me personally i've found these threads extremely confusing and disjointed. I'm not sure if that can be helped much but i think you're on the right track now. Some that come here aren't technically savvy. They just want the functionality and oddly enough, what they want i s the part that's not done yet.. playlists.. because it's the most useful to them.

Suggestions:

I personally found trying to get the right pieces and installing it a little confusing. I'm not sure how it works on the development end back there but it would be great if you could move the stuff out of the sandbox into a dev-release-audio-plus-5.xxx or something like that. People should know that stuff is cutting edge and could break. But It allows them to get all the pieces in one chunck which makes installing it, and enabling the modules quicker and easier to work with it, see what it does and provide you feedback. cvs sandboxes are a detterrent.. anyway.. just a thought..

Also.. look at my long post here:

http://drupal.org/node/93968#comment-207133

for a few more suggestions and follow ups.

I post a possible solution for playlists there using views right now so that you don't even really need a playlist module (at least not for straight up collections of audio nodes tagged with taxonomy term to define the playlist)

zirafa’s picture

Agreed. This stuff is disjointed. But I think that's because the playlist.module didn't have clear objectives to begin with. Just try and define what a playlist is and you'll see the dilemma. I think we have a clear path here, we just have to get each puzzle piece working independently. And each piece must have a clear objective by itself.

I also must admit I made a mess of things with these issues...
I tend to work out my thoughts a bit too publicly. ;)

zirafa’s picture

Audio_attach and audio_feeds modules are pretty much done. I'll commit them to the audio contrib directory soon. Drewish is working on a sweet audio_itunes.module which will pretty much do exactly what I proposed for the audio_podcast.module above, so that only leaves the proposed audio_playlist.module above. And I'm pretty sure that will be super easy to implement (just adding a UI for adding existing audio files to a list of attached files).

Things are looking good!

Ryanbach’s picture

Subscribing.

moonray’s picture

Subscribing...

jyamada1’s picture

subscribing... i wish there were another way without cluttering the comments!

newdru’s picture

What is the current status of teh playlist contrib module?

Is there anyway i can get a sandbox version and play with it?

I might even be able to help code / test it.

thanks

crbassett’s picture

I am subscribing to this as well.

I run a website that is using the audio_playlist.module to organize and provide a feed for a couple of podcasts. So, I am eagerly awaiting the release of a 5.0 version of these modules. This is currently the only module that we use that is still not 5.0 ready. So, if there is a test version, I can work on any testing that is needed.

jyamada1’s picture

zirafa, is the audio_attach.module done but sitting in your sandbox, or is there still work to be done? i don't want to be a pain, but if it is done (as it says under status above) I would like to use it!

thanks for your work!

zirafa’s picture

Doh! Sorry guys. Yes it's just collecting dust in my sandbox. I'll commit it to audio/contrib tonight.

zirafa’s picture

Hi guys,

I committed audio_feeds, audio_attach, and audio_playlist to audio/contrib HEAD. We should probably start talking about migration scripts from 4.7 playlist code.

jyamada1’s picture

the only thing i can see in CVS is that the directories were added. is there a time lag for files to show up?

zirafa’s picture

jyamada1: Whoops, I forgot to actually commit the files after CVS add contents. If you check now the files should be there in HEAD.

Ryanbach’s picture

I hope you add the sorting feature from audio playlist, to the audio module, that was quite useful.

zirafa’s picture

Sorting, or re-ordering the audio files without a page refresh is in the new version. There aren't any good drag/drop jQuery libraries so I decided to implement a simple AHAH interface. It's just as effective in my opinion although not as "slick" as the previous drag/drop stuff.

greygoo’s picture

I just installed the audio module for Drupal 5.1 and I'd like to test the new audio_playlist module in cvs.drupal.org. Is there a way to download a whole folder in viewcvs? It seems like I have to browse to each file and then download it which is tedious. Do I need to request a cvs account (even though I'm not a coder) assuming I can download it easier with a cvs client?

Or should I just use the views bonus package solution for audio playlist?

zirafa’s picture

You don't have to have a CVS account to download it, just something like Tortoise CVS to download it. I'm not sure how Drewish wants to do it, but basically I imagine the files will get added to the audio module dev zip file which you can then download and test. It's a lot easier than manually downloading each file one at a time.

greygoo’s picture

i'm trying to connect using a cvs client but a username/password is required for the client to try to connect. Is there an anonymous account?

wilgrace’s picture

subscribing... I run a couple of music label sites, and am kinda stuck without a 5.0 version of this module. I'm wishing the developers speed, wisdom and vast quantities of fine whisky.

ajwwong’s picture

subscribing.... thanks for all your work! looking for migration from 4.7 to 5.0... (my users *love* their playlists....)

greygoo’s picture

I was able to download (one file at a time) the Audio Playlist module under Audio module in cvs.drupal.org. And it installed fine but I don't see an option for it anywhere. I guess I also need to download and install the Playlist module from http://cvs.drupal.org/viewcvs/drupal/contributions/modules/playlist/?

Will this work on drupal 5?

zirafa’s picture

Hi,

No, do not download the 4.7 playlist module, it's incompatible with 5.0. Check out the README.txt in the modules you downloaded from audio CVS, it should help you configure the module. Basically you do it per node type, on admin/content/types . Note that audio_playlist depends on audio_attach btw.

wilgrace’s picture

Hey noborders - did you manage to get this working? I'm getting a bit desperate to update the playlist module and could really do with some pointers...
thanks

zirafa’s picture

The migration is almost complete. The 5.0 version of the playlist.module can be found in the audio module head branch. This branch is currently in audio HEAD:

http://ftp.osuosl.org/pub/drupal/files/projects/audio-5.x-2.x-dev.tar.gz

We need a migration script to convert 4.7 playlist nodes into 5.0 CCK playlist nodes. Here are the steps involved:

1) Programatically create a new cck node type with the fields for playlist metadata
See: http://drupal.org/node/115249

2) Import old playlist node metadata to this new CCK type
See: http://www.lullabot.com/articles/quick_and_dirty_cck_imports

3) Import old playlist node audio playlists to the audio_attach table

4) Turn on 5.0 audio_attach, audio_playlist, and audio_feeds for this node type.

These steps will migrate the 4.7 playlist node type, which has some associated metadata for the playlist.

ryooki’s picture

subscribing to this thread. Eagerly awaiting your results! :)

crbassett’s picture

I take it that I should hold off on upgrading my site to 5.x for a while still then.

ktnk’s picture

subscribing

rl’s picture

subscibing

t0b1’s picture

just subscribing ... awaiting further changes ;-)

csc4’s picture

subscribing - looking forward to this

yngens’s picture

zirafa, thank you very much for great work. i tried #35 and everything seems to work fine. except that on playlist pages every song has its own player, which is not very comfortable. is it possible to use one player for all the songs added in one playlist?

zirafa’s picture

Hi Snegny,

Were you successful in importing old playlist nodes from 4.7 following #35? If so, maybe you could post the steps involved in the migration progress.

Currently the default is to output each file with its own player...but you can override the theme function to have it output ONE player for all the files. See http://drupal.org/node/139581

I should probably just go ahead and add that as a configurable option so you don't have to override it like that.

yngens’s picture

Were you successful in importing old playlist nodes from 4.7 following #35? If so, maybe you could post the steps involved in the migration progress.

hi zirafa, actually i did not import old playlists, but created new one and added songs from the list of already uploaded audio-files. i had some playlists in 4.7, but then because i wanted to migrate to 5.0 and because playlists did not work in audio 5.x i gave up them since long. sorry for i can not be useful in this importing old playlists step.

I should probably just go ahead and add that as a configurable option so you don't have to override it like that

would be very nice and comfortable for may users, who are awaiting for this functions. though, i will proceed and try to override the theme as instructed http://drupal.org/node/139581

yngens’s picture

Now I can create different playlists, but how can I play them in one player? I would like to be able to select form several playlists in a site player block as it was possible in 4.7. Is there any way to do that in 5.x?

mediafrenzy’s picture

subscribing...

zirafa’s picture

You should open up a new issue for the audio.module for the audio_feeds_views.inc. It would probably good to make this customizable with views so you can choose which playlists to select from, etc...

yngens’s picture

I was not sure if I really needed to open a new issue for audio_playlist module ignoring its permissions, since this module has not been published. But I did. Please take a look http://drupal.org/node/165238

vthirteen’s picture

subscribing

rl’s picture

I created a clean 5.2 site and I would like to transfer all my audio content (including playlists) from my 4.7 installation to the 5.2 installation. I was hoping that by copying the files directory, adding the tables from my 4.7 site for audio and then enabling the audio modules in 5.2 would allow me to use my old audio content in 5.2. This produced a number of errors. Am I going about this wrong? After I do this, I will be trying to transfer the playlists. The reason that I want to not re-import all the audio is that these are podcats with lots of "show" notes. How can I transfer all my audio files from 4.7 to my 5.2 site?

Rich

zirafa’s picture

#15:

RL, sounds like you are having trouble upgrading the audio module itself. I'd file an issue on the audio module queue. This issue is about writing a migration script for older 4.7 > 5.0 playlists (currently there is none).

Gunderstorm’s picture

Title: Migrate Playlist Module to Audio Contrib modules » subscribing
Michelle’s picture

Title: subscribing » Migrate Playlist Module to Audio Contrib modules

Just fixing the title. Gunderstorm - Please don't change issue titles.

Michelle

Leech’s picture

Suscribing

Rix-UK’s picture

Subscribing,

headkit’s picture

i am also interested....

sedat44’s picture

subscribing...

mike.hobo’s picture

suscribing

thrash632’s picture

did anything ever come to fruition from this thread? All of these ideas are really great and I bet there's a ton of people (including me) that would make great use of this.

zirafa’s picture

Status: Active » Fixed

Hi thrash632,

You've managed to resurrect a thread that is a few years old. Check out the audio module issue queue as the playlist stuff has been a part of audio contrib for a while now and is currently undergoing some growing pains (what else is new? ;).

Marking this as fixed as I should have done 2 years ago.

Status: Fixed » Closed (fixed)

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

Vemma-1’s picture

I need a player that will stream my favorite radio stations in the format of PLS and M3U. Using D-7.26.
Thx.