[vlc-commits] [Git][videolan/vlc][master] 4 commits: fetcher: don't download network metadata if the user doesn't want to
Steve Lhomme (@robUx4)
gitlab at videolan.org
Tue Oct 15 09:37:47 UTC 2024
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
1a85d679 by Steve Lhomme at 2024-10-15T09:22:09+00:00
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 ea88b8d68e252445bcc305fd7a3dd45ef3ce0126.
Before that we only used FETCHER_SCOPE_LOCAL if the option wasn't set.
- - - - -
8b2428d3 by Steve Lhomme at 2024-10-15T09:22:09+00:00
fetcher: disable META_REQUEST_OPTION_FETCH_NETWORK based on user option
If "metadata-network-access" is false, we should never use this value.
input_fetcher_Push() is the only public/core entry that receives that option
so we only need to filter it out from there.
- - - - -
f9f332c2 by Steve Lhomme at 2024-10-15T09:22:09+00:00
fetcher: remove redundant check
We already eleminated the flag if the user option is disabled.
- - - - -
e85ead76 by Steve Lhomme at 2024-10-15T09:22:09+00:00
fetcher: move the metadata-network-access handling in the Qt caller
This is the only call, apart from libvlc, that may request to fetch from the network.
In libvlc there's an option to request netwrok fetching so it should be respected.
- - - - -
2 changed files:
- modules/gui/qt/player/player_controller.cpp
- src/preparser/fetcher.c
Changes:
=====================================
modules/gui/qt/player/player_controller.cpp
=====================================
@@ -1962,7 +1962,12 @@ void PlayerController::requestArtUpdate( input_item_t *p_item )
return;
}
- vlc_preparser_Push( d->m_preparser, p_item, META_REQUEST_OPTION_FETCH_ANY,
+ input_item_meta_request_option_t fetch_options =
+ var_InheritBool( d->p_intf, "metadata-network-access" ) ?
+ META_REQUEST_OPTION_FETCH_ANY :
+ META_REQUEST_OPTION_FETCH_LOCAL;
+
+ vlc_preparser_Push( d->m_preparser, p_item, fetch_options,
&art_fetcher_cbs, d, nullptr );
}
=====================================
src/preparser/fetcher.c
=====================================
@@ -383,8 +383,7 @@ static void RunSearchLocal(void *userdata)
if( SearchByScope( task, FETCHER_SCOPE_LOCAL ) == VLC_SUCCESS )
goto end; /* done */
- if( var_InheritBool( fetcher->owner, "metadata-network-access" ) ||
- task->options & META_REQUEST_OPTION_FETCH_NETWORK )
+ if( task->options & META_REQUEST_OPTION_FETCH_NETWORK )
{
int ret = Submit(fetcher, fetcher->executor_network, task->item,
task->options, task->cbs, task->userdata);
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/999e53e3c65f6696563d6d06c5b0d362dd85aa62...e85ead7660e52ee721607b7bed7fa8a2e7696292
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/999e53e3c65f6696563d6d06c5b0d362dd85aa62...e85ead7660e52ee721607b7bed7fa8a2e7696292
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list