lociii / jukebox

Democratic Jukebox - your democratic music player
MIT License
300 stars 62 forks source link

error on bad mp3 files #13

Closed tarekziade closed 12 years ago

tarekziade commented 12 years ago

File "/home/pi/jukebox/lib/python2.6/site-packages/mutagen/id3.py", line 211, in __load_header raise ID3NoHeaderError("'%s' doesn't start with an ID3 tag" % fn) mutagen.id3.ID3NoHeaderError: '/media/usbstick/Amon Tobin/Cujo/._01 Paris Streatham.mp3' doesn't start with an ID3 tag

the solution is to catch ID3NoHeaderError line 112 in jukebox_core/management/commands/jukebox_index.py and just skip it

lociii commented 12 years ago

Feel free to send a pull request.

ryansb commented 12 years ago

Umm, isn't this fixed? Just tested with ID3-less files and I get this behavior: File does not contain an id3 header: /my/tagless/music

code: 72 song.save() 73 except HeaderNotFoundError: 74 print "File contains invalid header data: " + filename 75 except ID3NoHeaderError: 76 print "File does not contain an id3 header: " + filename

lociii commented 12 years ago

Apparently I didn't set a new tag to update the pypi package after the fix was commited. As ryansb said, the trunk should already be safe.