From e62ab5fc711d264df8d9637689790fb3a33c1b2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Denis-Courmont?= Date: Sat, 12 Nov 2016 00:33:53 +0200 Subject: [PATCH] Remove stray "album-art" variable usage The variable value is always zero as of bdc3ad38. Simplify accordingly. --- include/vlc_meta.h | 8 -------- modules/access/cdda.c | 3 +-- modules/gui/qt/components/playlist/vlc_model.cpp | 3 +-- modules/gui/qt/dialogs/firstrun.cpp | 3 --- src/playlist/engine.c | 1 - src/playlist/fetcher.c | 9 ++++----- 6 files changed, 6 insertions(+), 21 deletions(-) diff --git a/include/vlc_meta.h b/include/vlc_meta.h index ad35faf364..d390d0bc4d 100644 --- a/include/vlc_meta.h +++ b/include/vlc_meta.h @@ -97,14 +97,6 @@ VLC_API void vlc_meta_SetStatus( vlc_meta_t *m, int status ); */ VLC_API const char * vlc_meta_TypeToLocalizedString( vlc_meta_type_t meta_type ); -/* deprecated (album-art variable) */ -enum { - ALBUM_ART_WHEN_ASKED, - ALBUM_ART_WHEN_PLAYED, - ALBUM_ART_ALL -}; - - typedef struct meta_export_t { VLC_COMMON_MEMBERS diff --git a/modules/access/cdda.c b/modules/access/cdda.c index a6d92f9147..576f40044b 100644 --- a/modules/access/cdda.c +++ b/modules/access/cdda.c @@ -259,8 +259,7 @@ struct access_sys_t #ifdef HAVE_LIBCDDB static cddb_disc_t *GetCDDBInfo( vlc_object_t *obj, int i_titles, int *p_sectors ) { - if( var_InheritInteger( obj, "album-art" ) != ALBUM_ART_ALL && - !var_InheritBool( obj, "metadata-network-access" ) ) + if( !var_InheritBool( obj, "metadata-network-access" ) ) { msg_Dbg( obj, "album art policy set to manual: not fetching" ); return NULL; diff --git a/modules/gui/qt/components/playlist/vlc_model.cpp b/modules/gui/qt/components/playlist/vlc_model.cpp index 3c4c67f00c..66886bf470 100644 --- a/modules/gui/qt/components/playlist/vlc_model.cpp +++ b/modules/gui/qt/components/playlist/vlc_model.cpp @@ -196,9 +196,8 @@ void VLCModel::ensureArtRequested( const QModelIndex &index ) { if ( index.isValid() && hasChildren( index ) ) { - int i_art_policy = var_GetInteger( THEPL, "album-art" ); bool b_access = var_InheritBool( THEPL, "metadata-network-access" ); - if ( i_art_policy != ALBUM_ART_ALL && ! b_access ) return; + if ( !b_access ) return; int nbnodes = rowCount( index ); QModelIndex child; for( int row = 0 ; row < nbnodes ; row++ ) diff --git a/modules/gui/qt/dialogs/firstrun.cpp b/modules/gui/qt/dialogs/firstrun.cpp index 8c733e7500..43f7108bc0 100644 --- a/modules/gui/qt/dialogs/firstrun.cpp +++ b/modules/gui/qt/dialogs/firstrun.cpp @@ -37,9 +37,6 @@ FirstRun::FirstRun( QWidget *_p, intf_thread_t *_p_intf ) setVisible( true ); } -#define ALBUM_ART_WHEN_ASKED 0 -#define ALBUM_ART_ALL 2 - void FirstRun::save() { config_PutInt( p_intf, "metadata-network-access", checkbox->isChecked() ); diff --git a/src/playlist/engine.c b/src/playlist/engine.c index 7c00a4878d..ea9896de2c 100644 --- a/src/playlist/engine.c +++ b/src/playlist/engine.c @@ -466,7 +466,6 @@ static void VariablesInit( playlist_t *p_playlist ) var_Create( p_playlist, "demux-filter", VLC_VAR_STRING | VLC_VAR_DOINHERIT ); /* */ - var_Create( p_playlist, "album-art", VLC_VAR_INTEGER | VLC_VAR_DOINHERIT ); var_Create( p_playlist, "metadata-network-access", VLC_VAR_BOOL | VLC_VAR_DOINHERIT ); /* Variables to preserve video output parameters */ diff --git a/src/playlist/fetcher.c b/src/playlist/fetcher.c index 506f9ccd94..23fa45aab4 100644 --- a/src/playlist/fetcher.c +++ b/src/playlist/fetcher.c @@ -108,11 +108,10 @@ playlist_fetcher_t *playlist_fetcher_New( vlc_object_t *parent ) vlc_cond_init( &p_fetcher->wait ); p_fetcher->b_live = false; - bool b_access = var_InheritBool( parent, "metadata-network-access" ); - if ( !b_access ) - b_access = ( var_InheritInteger( parent, "album-art" ) == ALBUM_ART_ALL ); - - p_fetcher->e_scope = ( b_access ) ? FETCHER_SCOPE_ANY : FETCHER_SCOPE_LOCAL; + if( var_InheritBool( parent, "metadata-network-access" ) ) + p_fetcher->e_scope = FETCHER_SCOPE_ANY; + else + p_fetcher->e_scope = FETCHER_SCOPE_LOCAL; memset( p_fetcher->p_waiting_head, 0, PASS_COUNT * sizeof(fetcher_entry_t *) ); memset( p_fetcher->p_waiting_tail, 0, PASS_COUNT * sizeof(fetcher_entry_t *) ); -- GitLab