Forums | Admin

Discussion Forums: open-discussion

Start New Thread Start New Thread
Message: 11713
BY: Georg Fritzsche (wizzar)
DATE: 2006-08-04 00:09
SUBJECT: writing multiple fields in TXXX

 

Hi,

for user defined fields in id3v2 TXXX mp3info does correctly read them into an array... which is fine so far :)

in irb:
> t = Mp3Info.new('01_-_Laibach_-_B_Mashina.mp3')
[blah blah...]
> t.tag2.TXXX
=> ["MusicBrainz Album Id\000b46bcba5-2ebf-4ecf-8b53-3f108cfbf4b7\000", "MusicBrainz Album Artist Id\000c779e090-909f-4403-a90e-c1d08cdbb719\000"]

but no the price question:
how do i write more then one field into TXXX?
i assumed i'd simply assign arrays... but obviously this doesn't work:
> t.tag2.TXXX = ["foo\000bar","bar\000foo"]
=> ["foo\000bar", "bar\000foo"]
> t.close
=> nil
> t = Mp3Info.new('01_-_Laibach_-_B_Mashina.mp3')
[blah...]
> t.tag2.TXXX
=> "foo\000barbar\000foo"

hm :/

if anyone can tell me how i'm supposed to do that... i'd be quite glad :)


Thread View

Thread Author Date
writing multiple fields in TXXXGeorg Fritzsche2006-08-04 00:09

Post a followup to this message