fetcher: don't download network metadata if the user doesn't want to

The option is defined as "Allow metadata network access". If it's false (default but query during the first run) that means the
user doesn't want to check metadata from the network.
So we should not start a network job when there's a possibility to do it.

This is a regression from ea88b8d68e.
Before that we only used FETCHER_SCOPE_LOCAL if the option wasn't set.

(cherry picked from commit 1a85d67939)
This commit is contained in:
Steve Lhomme 2024-10-14 11:11:36 +02:00
parent a618e31cf2
commit 5cdb9b2544

View File

@ -294,7 +294,7 @@ static void SearchLocal( playlist_fetcher_t* fetcher, struct fetcher_request* re
if( SearchByScope( fetcher, req, FETCHER_SCOPE_LOCAL ) == VLC_SUCCESS )
return; /* done */
if( var_InheritBool( fetcher->owner, "metadata-network-access" ) ||
if( var_InheritBool( fetcher->owner, "metadata-network-access" ) &&
req->options & META_REQUEST_OPTION_SCOPE_NETWORK )
{
if( background_worker_Push( fetcher->network, req, NULL, 0 ) )