jasonmc / forked-daapd

A re-write of the firefly media server (mt-daapd). It's released under GPLv2+. Please note that this git repository is a mirror of the official one at git://git.debian.org/~jblache/forked-daapd.git
http://blog.technologeek.org/2009/06/12/217
GNU General Public License v2.0
328 stars 45 forks source link

Requesting artwork for albumid fails #89

Open couteau opened 12 years ago

couteau commented 12 years ago

forked-daapd fails to return artwork when requested by albumid. The request takes the form:

/databases/1/groups/[groupid]/extra_data/artwork

The handler (daap_reply_extra_data in httpd_daap.c) assumes that the groupid is 32 bits, but daap albumids are 64 bits (DMAP_TYPE_ULONG in forked-daapd). As a result, requesting by albumid chokes in the handler on the call to safe_atoi32.

I don't know what other id types this handler deals with, so I am not sure if it is safe to just switch to a 64 bit conversion there or if that will throw off some other code.