taglib-ruby: Setting a Playlist ID to an M4A file does not work properly.

Hi!

First off, I want to say thanks for this great wrapper for TagLib! However, there is a problem when trying to set a playlist ID to a m4a file. If I execute the code below:

TagLib::MP4::File.open("song.m4a") do |tune|
  item = TagLib::MP4::Item.from_int(123456789)
  tune.tag.item_list_map.insert('plID', item)
  tune.save
end

The playlist id then gets assigned a long random number which is not the number supplied (In this case I checked using mp4info which yielded 72057594161384725 for the playlist id, using a random sample m4a).

Its quite strange as it works on occasion, but more times than not it fails and stores a very large, random number for the song. Any help would be appreciated.

Thanks.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 15 (3 by maintainers)

Most upvoted comments

Looking at the headers of the wrap.cxx files they were generated with swig 3.0.7. @robinst what taglib version are we using at the moment?

I can write a dockerfile that installs taglib and swig from source at the exact required version. That should make it easier to recompile during development. And it beats trying to get the right versions installed on random developer’s operating systems.

Yep, and a test here. https://github.com/robinst/taglib-ruby/blob/master/test/mp4_items_test.rb#L103

The part of this I’m rusty at is setting up SWIG, using the correct TagLib header files (so that the generated wrapper code targets what is it, TagLib 1.7?) etc. And I switched from Homebrew to MacPorts.

Stuff like that. 😃 I can figure it out, I just need to find a moment to putter with this.