mirror of
https://github.com/owntone/owntone-server.git
synced 2025-01-30 07:56:02 -05:00
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:
parent
a5a46b8a53
commit
42dd7ddd00
@ -1210,6 +1210,8 @@ daap_reply_songlist_generic(struct evhttp_request *req, struct evbuffer *evbuf,
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val = 0;
|
||||||
|
|
||||||
if (transcode)
|
if (transcode)
|
||||||
{
|
{
|
||||||
switch (dfm->mfi_offset)
|
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);
|
dmap_add_field(song, dfm, *strval, val);
|
||||||
|
|
||||||
DPRINTF(E_DBG, L_DAAP, "Done with meta tag %s (%s)\n", dfm->desc, *strval);
|
DPRINTF(E_DBG, L_DAAP, "Done with meta tag %s (%s)\n", dfm->desc, *strval);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user