devsnd / cherrymusic

Stream your own music collection to all your devices! The easy to use free and open-source music streaming server.
http://www.fomori.org/cherrymusic
GNU General Public License v3.0
1.03k stars 187 forks source link

Error getting song metainfo, no album art next to player controls #671

Open kozross opened 7 years ago

kozross commented 7 years ago

I just set up CherryMusic, and put one album into the folder for testing purposes. The files are all Ogg Vorbis (extension .ogg), and I have vorbis-tools installed. However, every time I bring up the album in the web player, I get the 'error getting song metainfo' message in the browser. In the terminal, I get the following traceback:

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/cherrypy/_cprequest.py", line 670, in respond
    response.body = self.handler()
  File "/usr/lib/python3.6/site-packages/cherrypy/lib/encoding.py", line 220, in __call__
    self.body = self.oldhandler(*args, **kwargs)
  File "/usr/lib/python3.6/site-packages/cherrypy/_cpdispatch.py", line 60, in __call__
    return self.callable(*self.args, **self.kwargs)
  File "/usr/lib/python3.6/site-packages/cherrymusicserver/httphandler.py", line 295, in api
    return json.dumps({'data': handler(**handler_args)})
  File "/usr/lib/python3.6/site-packages/cherrymusicserver/httphandler.py", line 715, in api_getsonginfo
    return json.dumps(metainfo.getSongInfo(abspath).dict())
  File "/usr/lib/python3.6/site-packages/cherrymusicserver/metainfo.py", line 58, in getSongInfo
    tag = TinyTag.get(filepath)
  File "/usr/lib/python3.6/site-packages/tinytag/tinytag.py", line 105, in get
    tag.load(tags=tags, duration=duration, image=image)
  File "/usr/lib/python3.6/site-packages/tinytag/tinytag.py", line 126, in load
    self._determine_duration(self._filehandler)
  File "/usr/lib/python3.6/site-packages/tinytag/tinytag.py", line 672, in _determine_duration
    self.duration = self._max_samplenum / float(self.samplerate)
TypeError: float() argument must be a string or a number, not 'NoneType'

Additionally, the album art is not displaying in the player UI (next to the playback controls), although in the folder view, I can see it just fine. Am I missing something critical here?

devsnd commented 7 years ago

hey @kozross,

I seem to have missed this issue, dang, sorry. Can you please send me the failing file in question to my email adress tomwallroth [aŧ] gmail [døt] com ?

This is actually an error in https://github.com/devsnd/tinytag the audio meta data parser I wrote for CherryMusic.