B
Bira
Hello,
I'm trying to organize my MP3 collection using id3lib-ruby, to go
through it and sort the files into artist/album folders according to
their ID3 information.
However, in some files, my script breaks with the following message:
undefined method 'get_type' for nil:NilClass
The message corresponds to the following line:
tag = ID3Lib::Tag.new(mp3)
'mp3' is a variable holding the name of the file being currently processed.
After a bit of testing and looking at the documentation for the "new"
method, it seems this happens because a given file may have some
invalid frames in its tag, or no frames at all (i.e, no tag).
Does anyone know if this is a bug or simply user error on my part? If
it is a bug, I'll gladly report it on rubyforge, but if it's user
error I'd like to know the correct way to go about this .
I'm trying to organize my MP3 collection using id3lib-ruby, to go
through it and sort the files into artist/album folders according to
their ID3 information.
However, in some files, my script breaks with the following message:
undefined method 'get_type' for nil:NilClass
The message corresponds to the following line:
tag = ID3Lib::Tag.new(mp3)
'mp3' is a variable holding the name of the file being currently processed.
After a bit of testing and looking at the documentation for the "new"
method, it seems this happens because a given file may have some
invalid frames in its tag, or no frames at all (i.e, no tag).
Does anyone know if this is a bug or simply user error on my part? If
it is a bug, I'll gladly report it on rubyforge, but if it's user
error I'd like to know the correct way to go about this .