lib/media: don't request local art twice
authorThomas Guillem <thomas@gllm.fr>
Thu, 5 Oct 2017 08:35:47 +0000 (10:35 +0200)
committerThomas Guillem <thomas@gllm.fr>
Thu, 5 Oct 2017 09:18:57 +0000 (11:18 +0200)
lib/media.c

index 30e5bd5..8da5a13 100644 (file)
@@ -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;
         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;
         int ret;
 
-        if (parse_flag & libvlc_media_fetch_local)
-            art_scope |= META_REQUEST_OPTION_SCOPE_LOCAL;
+        /* Ignore libvlc_media_fetch_local flag since local art will be fetched
+         * by libvlc_MetadataRequest */
         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, art_scope);
+        {
+            ret = libvlc_ArtRequest(libvlc, item,
+                                    META_REQUEST_OPTION_SCOPE_NETWORK);
             if (ret != VLC_SUCCESS)
                 return ret;
         }