I'm creating a website where I need a lot of nodes (1000000+) with audio files, so audio filefield seems like a good solution. I don't want to create a node for each audio file, and I want the flexibility of CCK.

For 6.x wishlist:

Have a display type integrated like the tiny player project.
Integrate with tokens.
Integrate with node import.
Exposing file name in node import in order to automatically create filefield database entries.

Comments

moonray’s picture

I would like to know the status here as well.

Flying Drupalist’s picture

yes same here please.

pkej’s picture

Ive been looking into this, and it seems that as long as the data is stored in the filefield, I can use the template to determine if the file is an audiofile, and attach the flashplayer of my own choice. That's what I'm going to do on my above mentioned project, when it resumes in the new year.

And, IIRC, any filefield you create can have the extensions allowed set individually, so you can just add extensions for the fileformats your player of choice can support.

I hope the above will be of help for you and other people.

Flying Drupalist’s picture

Thank you pkej, do you have any plans on doing anything with metadata?

pkej’s picture

Metadata could just be fields in the node you have created. Then use getid3, filefield_meta, filefield_token and similar to extract and place the metadata into the fields. I hope filefield_meta creates tokens.

No plans on work yet, waiting for two companies finishing the copyright deal and everything before I continue.

Flying Drupalist’s picture

Ahh filefield_meta confuzzles the heck out of me. I have not a clue what it does. It requires getid3, but I see no configuration for it, nada. So right now it seems to me like it doesn't do anything. I suppose you have no experience with it?

pkej’s picture

From the code in filefield_meta I can gather that it hooks into filefield functions. In other words, it just expands the data which filefield saves for each file with info gathered through the getid3_analyze function. It then stores those data in the filefield_meta table, and restores it, automatically each time a file is requested through filefield.

File has an array called $file->data which is merged with the getid3 information, so, in theory you should be able to load a file and use the items in the array.

Use some custom PHP code in a filefield in cck, add vardum($field_your_filefield[0]); to analyze what info is available for use; or create a new index2.php file, and add the following:

<?php
$nid = 1; /* A previously created and saved node with a filefield containing an uploaded file */
	$active = TRUE;
	include_once "includes/bootstrap.inc";
  include_once("includes/common.inc");
  drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
$node = node_load( $nid );
var_dump( $node );

You can now access that file through localhost/index2.php and get the info you need (use source view or add pre tags around the php).

I guess you will find all the data that getid3 can extract from the filetype you've uploaded inside there somewhere.

Flying Drupalist’s picture

I see thank you, I'll probably wait for the new media module though. It looks to be amazing.

pkej’s picture

Which new media module? Any link? I just tried wordpress, and was impressed by how well it worked with media out of the box. Very nice integration there. Then there was this plugin: http://honewatson.com/og/wordpress-video-plugin-search-pop-n-code/

Not like uploading to your site, but very nice UI.

Flying Drupalist’s picture