This issue will document the 7.x-2.x roadmap. The 2.x branch of getID3 harnesses the metadata capabilities of File Entity and aims to provide a robust integration for the Drupal 7 Media Initiative.

Why a new release branch? This is a major API change as the module currently provides its own metadata table for ID3 information. File Entity provides this, and methods to attach metadata on entity load. Code bloat is reduced drastically by making this move. However, the main branch is not being updated since it could break existing sites (custom table access, non file entity use, etc.)

The 7.x-1.x branch will be minimally maintained, for community tested patches.

Comments

mglaman’s picture

Issue summary: View changes
mglaman’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev

Now have the 7.x-2.x branch :) Updating.

mglaman’s picture

mglaman’s picture

mglaman’s picture

mglaman’s picture

Issue summary: View changes

Updating install hook item link.

mglaman’s picture

Issue summary: View changes
mglaman’s picture

Just released beta1 of 7.x-2.x. Need to update project page!

DamienMcKenna’s picture

Title: getID3 2.x Roadmap » META: Plan for getID3 v7.x-2.0 release
Component: Code » Miscellaneous
Issue summary: View changes

Maybe standardize the title?

MickC’s picture

Hi - thanks for this work - however I can't get it to work.

I have 7.x-2 Dev versions installed for getID3() and Media, as well as File Entity 7.x-2.0-beta1
However uploading mp3's is not showing any ID3 metadata loaded into any File Type fields.
I assumed Title at least would load into field_data_media_title however no new data is visible.
I checked that the mp3 files do have metadata.

Is there a field mapping step required? To get ID3 tags and assign them to a File Entity field?

Thanks

mglaman’s picture

MickC, thus nodule, the 2.x at least, merely ensures the metadata from ID3 is stored. So your file entity's metadata property array has this.

You'd need to do some hook_file_presave() magic to pull title from there and save it as the file's title.

I don't want this module to assume too much, and merely be a way for bridging the 3rd party library into Drupal.

You may want to also see #2397227: File formatter to show metadata

MickC’s picture

@mglaman - thanks for responding. My issue was that I was not getting any data stored in files_metadata - however I think I worked out what's going on:

- I am using S3 to store the uploaded file, which doesn't seem to store the metadata.
- However it does work when when I switch the "Allowed URI schemes" and "Upload destination" to "Public files".
- So the table files_metadata is only populated when I use Public files.

I suspect this is because the getID3 library can't access S3 or does not have ownership/permissions. I've experimented before with just php ID3 (not the getID3 library), and could only get it to work when S3 was mounted using Fuse, ownership was www-data with full read/write permission.

However the Drupal S3 module connects using "AWSSDK for PHP", not Fuse.
Given the increasing use of S3 to store media, can you think of a way to get getID3 to work?

Thanks

MickC’s picture

UPDATE - all working well when uploading to public:// then migrating to S3 later.

However still struggling with getting the id3 title from metadata, to write to a file field during the upload process.

We're trying a form_file_entity_add_upload_alter function, and can easily set a default value for title.
But just not sure how to get the metadata value.
All I know is at this point, the records are not written to the file_metadata table yet, so they must be in variables at this stage.

Looked at hook_file_presave but not sure how to get it to work.

Any help appreciated.

mglaman’s picture

MickC, look at this module's code. It works on hook_file_presave, so you need to run on that. But use implements_alter() to ensure you run after getid3, or name your module alphabetically heavier than "g" (h, i, j,...)

MickC’s picture

Actually we've got a solution using form_alter to get the song name loaded as a 'default' field value to our MEdia Title field. The user then saves as is or can edit first.
Thanks for your direction @mglaman
Cheers.