Skip to content

Commit

Permalink
Remove stray "album-art" variable usage
Browse files Browse the repository at this point in the history
The variable value is always zero as of bdc3ad3. Simplify accordingly.
  • Loading branch information
Rémi Denis-Courmont committed Nov 11, 2016
1 parent 5c36c93 commit e62ab5f
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 21 deletions.
8 changes: 0 additions & 8 deletions include/vlc_meta.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions modules/access/cdda.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 1 addition & 2 deletions modules/gui/qt/components/playlist/vlc_model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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++ )
Expand Down
3 changes: 0 additions & 3 deletions modules/gui/qt/dialogs/firstrun.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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() );
Expand Down
1 change: 0 additions & 1 deletion src/playlist/engine.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
9 changes: 4 additions & 5 deletions src/playlist/fetcher.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 *) );
Expand Down

0 comments on commit e62ab5f

Please sign in to comment.