Commit 9264da84 authored by Thomas Guillem's avatar Thomas Guillem

lib/media: don't request local art twice

parent c972cfd0
...@@ -774,16 +774,15 @@ static int media_parse(libvlc_media_t *media, bool b_async, ...@@ -774,16 +774,15 @@ static int media_parse(libvlc_media_t *media, bool b_async,
{ {
libvlc_int_t *libvlc = media->p_libvlc_instance->p_libvlc_int; libvlc_int_t *libvlc = media->p_libvlc_instance->p_libvlc_int;
input_item_t *item = media->p_input_item; input_item_t *item = media->p_input_item;
input_item_meta_request_option_t art_scope = META_REQUEST_OPTION_NONE;
input_item_meta_request_option_t parse_scope = META_REQUEST_OPTION_SCOPE_LOCAL; input_item_meta_request_option_t parse_scope = META_REQUEST_OPTION_SCOPE_LOCAL;
int ret; int ret;
if (parse_flag & libvlc_media_fetch_local) /* Ignore libvlc_media_fetch_local flag since local art will be fetched
art_scope |= META_REQUEST_OPTION_SCOPE_LOCAL; * by libvlc_MetadataRequest */
if (parse_flag & libvlc_media_fetch_network) if (parse_flag & libvlc_media_fetch_network)
art_scope |= META_REQUEST_OPTION_SCOPE_NETWORK; {
if (art_scope != META_REQUEST_OPTION_NONE) { ret = libvlc_ArtRequest(libvlc, item,
ret = libvlc_ArtRequest(libvlc, item, art_scope); META_REQUEST_OPTION_SCOPE_NETWORK);
if (ret != VLC_SUCCESS) if (ret != VLC_SUCCESS)
return ret; return ret;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment