Commit 9c9d1ddd authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

playlist: Add an option to disable meta-fetch. (Need to be merged with art-fetch).

parent 014ff1d3
......@@ -1065,6 +1065,11 @@ static const char *ppsz_clock_descriptions[] =
"Automatically preparse files added to the playlist " \
"(to retrieve some metadata)." )
#define FETCH_META_TEXT N_( "Meta fetcher policy" )
#define FETCH_META_LONGTEXT N_( \
"Specify if you want to attempt to fetch files'"\
"meta informations using the network." );
#define ALBUM_ART_TEXT N_( "Album art policy" )
#define ALBUM_ART_LONGTEXT N_( \
"Choose how album art will be downloaded." );
......@@ -1851,6 +1856,9 @@ vlc_module_begin();
add_bool( "auto-preparse", VLC_TRUE, NULL, PREPARSE_TEXT,
PREPARSE_LONGTEXT, VLC_FALSE );
add_integer( "fetch-meta", VLC_TRUE, NULL, FETCH_META_TEXT,
FETCH_META_LONGTEXT, VLC_FALSE );
add_integer( "album-art", ALBUM_ART_WHEN_ASKED, NULL, ALBUM_ART_TEXT,
ALBUM_ART_LONGTEXT, VLC_FALSE );
change_integer_list( pi_albumart_values,
......
......@@ -590,8 +590,14 @@ void playlist_FetcherLoop( playlist_fetcher_t *p_obj )
{
if( !b_fetch_art )
{
input_MetaFetch( p_playlist, p_item );
var_SetInteger( p_playlist, "item-change", p_item->i_id );
/* If the user doesn't want us to fetch meta automatically
* abort here. */
if( p_playlist->p_fetcher->b_fetch_meta )
{
input_MetaFetch( p_playlist, p_item );
var_SetInteger( p_playlist, "item-change", p_item->i_id );
}
/* Fetch right now */
if( p_playlist->p_fetcher->i_art_policy == ALBUM_ART_ALL )
{
......
......@@ -55,6 +55,7 @@ struct playlist_fetcher_t
VLC_COMMON_MEMBERS
vlc_mutex_t lock;
int i_art_policy;
vlc_bool_t b_fetch_meta;
int i_waiting;
preparse_item_t *p_waiting;
......
......@@ -97,6 +97,8 @@ void __playlist_ThreadCreate( vlc_object_t *p_parent )
}
p_playlist->p_fetcher->i_waiting = 0;
p_playlist->p_fetcher->p_waiting = NULL;
p_playlist->p_fetcher->b_fetch_meta = var_CreateGetInteger( p_playlist,
"meta-fetch" );
p_playlist->p_fetcher->i_art_policy = var_CreateGetInteger( p_playlist,
"album-art" );
......
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