Open rizafahmi opened 8 years ago
Hi @rizafahmi I solved that issue with
title = String.trim title, <<0>>
artist = String.trim artist, <<0>>
album = String.trim album, <<0>>
I think the problem is that we get all the 30 characters even if data are less than 30 so the rest are all 0s.
@ilasorsa thanks! @benjamintanweihao should update his code on the book then :)
To be fair to @benjamintanweihao - I did not have this issue at all. Great solution @ilasorsa :+1:
the id3parse code in the book only could parse the ID3v1 info . but nowadays most of mp3 file id3 tag version is ID3v2 https://zh.wikipedia.org/wiki/ID3
Tried to run
ID3Parser.parse "/Users/riza/Downloads/Barn_Owl-The_Long_Shadow.mp3"
. Got the following result:Music took from http://www.epitonic.com/#/genres/blues/.
Just wondering it's because of the mp3 file or the code. Because I tried 3 mp3s the results are similar.