[vlc-commits] Qt: PLModel: make auto art download comply with privacy policy
Francois Cartegnie
git at videolan.org
Sat Jun 16 19:55:55 CEST 2012
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Sat Jun 16 19:52:18 2012 +0200| [21614a27145582dec1fff9482f7014ef74e9db64] | committer: Francois Cartegnie
Qt: PLModel: make auto art download comply with privacy policy
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=21614a27145582dec1fff9482f7014ef74e9db64
---
modules/gui/qt4/components/playlist/playlist_model.cpp | 8 +++++++-
modules/gui/qt4/input_manager.cpp | 3 +--
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/modules/gui/qt4/components/playlist/playlist_model.cpp b/modules/gui/qt4/components/playlist/playlist_model.cpp
index 609bcbc..e9578a0 100644
--- a/modules/gui/qt4/components/playlist/playlist_model.cpp
+++ b/modules/gui/qt4/components/playlist/playlist_model.cpp
@@ -391,7 +391,11 @@ QVariant PLModel::data( const QModelIndex &index, const int role ) const
}
else if( role == Qt::ToolTipRole )
{
- QString artUrl = getArtUrl( index );
+ int i_art_policy = var_GetInteger( p_playlist, "album-art" );
+ QString artUrl;
+ /* FIXME: Skip, as we don't want the pixmap and do not know the cached art file */
+ if ( i_art_policy == ALBUM_ART_ALL )
+ artUrl = getArtUrl( index );
if ( artUrl.isEmpty() ) artUrl = ":/noart";
QString duration = qtr( "unknown" );
QString name;
@@ -1031,6 +1035,8 @@ void PLModel::ensureArtRequested( const QModelIndex &index )
{
if ( index.isValid() && hasChildren( index ) )
{
+ int i_art_policy = var_GetInteger( p_playlist, "album-art" );
+ if ( i_art_policy != ALBUM_ART_ALL ) return;
int nbnodes = rowCount( index );
QModelIndex child;
for( int row = 0 ; row < nbnodes ; row++ )
diff --git a/modules/gui/qt4/input_manager.cpp b/modules/gui/qt4/input_manager.cpp
index 671b4e0..d74ab0f 100644
--- a/modules/gui/qt4/input_manager.cpp
+++ b/modules/gui/qt4/input_manager.cpp
@@ -643,8 +643,7 @@ void InputManager::requestArtUpdate( input_item_t *p_item )
if ( p_item->p_meta )
{
int status = vlc_meta_GetStatus( p_item->p_meta );
- if ( status & ( ITEM_ART_NOTFOUND|ITEM_ART_FETCHED|
- ITEM_ARTURL_FETCHED|ITEM_PREPARSED ) )
+ if ( status & ( ITEM_ART_NOTFOUND|ITEM_ART_FETCHED ) )
return;
}
playlist_AskForArtEnqueue( pl_Get(p_intf), p_item );
More information about the vlc-commits
mailing list