Does any know whether it's possible to add an ID3 comment tag to every uploaded mp3?

Comments

drewish’s picture

you mean like add some coded to auto-magically write a comment? what version 4.6 or HEAD/4.7?

mediafrenzy’s picture

Yeah, I'd like to automatically add an ID3 comment to each MP3 that is uploaded by one of my users.

I'm a little confused about the whole CVS/HEAD thing... I guess it's 4.6 that I'm using?

My audio module has this at the top?
$Id: audio.module,v 1.32 2006/01/13 08:00:20 drewish Exp $

Is this sort of thing possible? Complicated?

Cheers

drewish’s picture

that looks like an older version of the 4.6 branch. what version of Drupal are you using though? i'm assuming 4.6?

if you're down to hack the module you could just edit the audio_insert() method to set the comment before the id3 tags are saved...

mediafrenzy’s picture

Yes drupal version 4.6

If I could get a few pointers (or even a handy code snippet ;) I could try changing the module a little...

drewish’s picture

essentially all you'd need to do is add some code to audio_insert() that set the desired comment into
$node->audio['comment'] before the values were added to the database and then the file.

humm, now that i'm looking at audio_insert() i've noticed that, unlike audio_update(), it doesn't call audio_write_ID3tags(). that may be a bug... anyone like to comment? colin?

drewish’s picture

Version: 5.x-1.x-dev » 4.6.x-1.x-dev
Status: Active » Closed (fixed)