#2: Eliminate pyid3lib and id3lib dependency
- Contents
- Proposed by
- Nate Aune
- Proposal type
- Architecture
- Assigned to release
- Repository branch
- trunk
- State
- completed
Motivation
I have observed that many users have a hard time installing ATAudio because they must first install pyid3lib which itself has a depedency on id3lib. Installing these dependencies can be a stumbling block for some users.
I recently came across some pure python modules for reading and writing the ID3 tags, so I don't see any reason why we need to continue using pyid3lib.
Assumptions
We are assuming that the audio files being uploaded are MP3 files. This improvement proposal does not attempt to address reading the metadata of non-MP3 files (OGG, Real Audio, Windows Media, etc.)
Proposal
We need to remove the ID3Storage and instead use id3reader and id3writer to read in the tags from the MP3 file, and if they are changed in the Plone edit form, write them back to the MP3 file.
Implementation
I suggest that we try to rewrite ATAudio as a subclassed ATExtFile (from the ATCTAddons product in the collective). In this way, ATAudio will inherit all of the good engineering practices that have gone into the ATContentTypes project, and we simply need to add our additional schema and methods for reading and writing the ID3 tags.
We used the eyeD3 library. Thanks to Volodymr for pointing this out!
We rejected these two python modules because there was weak unicode support and the writer has poor handling of ID3 tags:
We may need to split the schema into two pages, so the first page is simply the file upload field, and the second page (schemata="Audio file metadata") will show all the metadata fields, with the data extracted from the ID3 tags.
Deliverables
Either a modified ATAudio, or a new product called ATAudioExt which should do the following:
- lets the user upload an MP3 file either via the web form or via WebDAV/FTP (check to make sure it's compatible with DavPack)
- shows the appropriate icon
- parses the ID3 tags and auto-populates the edit form
- stores the file on the file system using ExternalStorage
- provides a streaming url and download url
Risks
Since we are ripping out the ID3Storage, there may be serious migration issues when we try to move older ATAudio instances to the new version of ATAudio. If it proves to difficult to write migration scripts, we may release it as a separate product.
Progress log
2004-10-14: The ID3 reading works and the writing was working but now it seems that I'm getting an error when trying to write ID3v2 tags. http://paste.plone.org/3264 (Nate)
Participants
Nate Aune
Salim Fadhley
Volodymyr Cherepanyak
Rocky Burt