Write support
Thanks for the great project. Are there any plans for write support?
Apologies for the late reply, I have been rather ill.
It would be possible to add write support but I personally will not have the time for quite a while yet. I can try look into it and at least plan it out but I can't promise anything on it being done, sorry about that.
Okay fair enough.
Thanks for the response @43081j. I have created a repo for benchmarking id3 libs and your was one of the three I found that worked really well. I have written a blog post about the performance results in case you are interested.
If you do end up adding write support I will add it to my blog post.
I would also be interested in write support. I could probably help implement it, with some guidance.
@43081j I'd love to add write support. Would you mind updating this thread with a high-level overview of how you'd go about it?
I'm sorry I haven't been involved in this repo for quite a long time, I haven't had the time for various reasons.
There's a few problems with the repo in addition to the need for write support, such as:
- Make use of grunt or gulp for minification and concatenation
- Tests are lacking (had some locally, no more though)
As for write support, you'd want to implement it as per the 2.3 spec most likely here: http://id3.org/d3v2.3.0
So off the top of my head:
- Take some file as input (maybe a blob or something)
- Create an ID3 header, where size is yet to be calculated
- Iterate over each frame type to be added and append the correct headers/data to your ID3 tag (the spec above explains the structure of each frame type well)
- Set the ID3 header's size value to the sum of the frames (excluding the header its self)
- Write the complete ID3 tag to the start of the file you're altering
@43081j thanks for the in-depth reply!
I've already added support for automated concatenation+tests in my fork. Gulp is a lil overkill for this type of thing whereas browserify is purrrfect. I'll be sending a PR for write support shortly.
@oddityoverseer13 did you have a crack at implementing write support based on the info from @43081j ?
I have not. I've been pretty busy since I asked about that, but I should be coming into some free time soon. I'll keep this in mind.