[vlc-commits] Remove stray "album-art" variable usage

Rémi Denis-Courmont git at videolan.org
Fri Nov 11 23:35:07 CET 2016


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Nov 12 00:33:53 2016 +0200| [e62ab5fc711d264df8d9637689790fb3a33c1b2a] | committer: Rémi Denis-Courmont

Remove stray "album-art" variable usage

The variable value is always zero as of bdc3ad38. Simplify accordingly.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e62ab5fc711d264df8d9637689790fb3a33c1b2a
---

 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 ad35faf..d390d0b 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 a6d92f9..576f400 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 3c4c67f..66886bf 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 8c733e7..43f7108 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 7c00a48..ea9896d 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 506f9cc..23fa45a 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 *) );



More information about the vlc-commits mailing list