Kill code redundant with dmap_add_field()

This code in daap_reply_songlist_generic() is redundant with code
in (new) dmap_add_field() and can be removed, with a tweak: we must
ensure the val integer is always 0 if not used to override a value in
the transcoding case.
This commit is contained in:
Julien BLACHE 2010-02-08 14:50:26 +01:00
parent a5a46b8a53
commit 42dd7ddd00

View File

@ -1210,6 +1210,8 @@ daap_reply_songlist_generic(struct evhttp_request *req, struct evbuffer *evbuf,
continue;
}
val = 0;
if (transcode)
{
switch (dfm->mfi_offset)
@ -1241,13 +1243,6 @@ daap_reply_songlist_generic(struct evhttp_request *req, struct evbuffer *evbuf,
}
}
if (*strval && (dfm->type != DMAP_TYPE_STRING))
{
ret = safe_atoi32(*strval, &val);
if (ret < 0)
val = 0;
}
dmap_add_field(song, dfm, *strval, val);
DPRINTF(E_DBG, L_DAAP, "Done with meta tag %s (%s)\n", dfm->desc, *strval);