]> git.sesse.net Git - vlc/commitdiff
Qt4 - Make the update() update the art in mediaInfo.
authorJean-Baptiste Kempf <jb@videolan.org>
Wed, 13 Jun 2007 23:47:56 +0000 (23:47 +0000)
committerJean-Baptiste Kempf <jb@videolan.org>
Wed, 13 Jun 2007 23:47:56 +0000 (23:47 +0000)
modules/gui/qt4/components/infopanels.cpp
modules/gui/qt4/components/infopanels.hpp
modules/gui/qt4/dialogs/mediainfo.cpp

index 7fc3ad6960562475824e070add77d64d8d79a7a6..638c0382c888f15c39ec9c3928e9cf0bd129e842 100644 (file)
@@ -173,15 +173,14 @@ void MetaPanel::update( input_item_t *p_item )
     UPDATE_META_INT( rating, rating_text );
 
 #undef UPDATE_META
-}
-
-void MetaPanel::setArt( QString artUrl )
-{
-    msg_Dbg( p_intf, "Trying to update art" );
-    if( artUrl.isNull() )
-        art_cover->setPixmap( QPixmap( ":/noart.png" ) );
-    else
+    psz_meta = p_item->p_meta->psz_arturl;
+    if( psz_meta && !strncmp( psz_meta, "file://", 7 ) )
+    {
+        QString artUrl = qfu( psz_meta ).replace( "file://",QString("" ) );
         art_cover->setPixmap( QPixmap( artUrl ) );
+    }
+    else
+        art_cover->setPixmap( QPixmap( ":/noart.png" ) );
 }
 
 void MetaPanel::clear(){}
index ee5d29f8ec3a9e16f3f36bcea09e6fd659e97958..54fce5d230a4264a86a5783f4682c579bef8f537 100644 (file)
@@ -74,8 +74,6 @@ private:
 public slots:
     void update( input_item_t * );
     void clear();
-private slots:
-    void setArt( QString );
 signals:
     void uriSet( QString );
 };
index 1ed394141f8ab732f47b9ab9e2bde4042b1cfad4..75bbe4e6a46835aff0dbed995a7ca1874aa9b3ce 100644 (file)
@@ -92,7 +92,7 @@ MediaInfoDialog::~MediaInfoDialog()
     writeSettings( "mediainfo" );
 }
 
-void MediaInfoDialog::showTab(int i_tab=0)
+void MediaInfoDialog::showTab( int i_tab = 0 )
 {
     this->show();
     IT->setCurrentIndex( i_tab );
@@ -106,7 +106,7 @@ static int ItemChanged( vlc_object_t *p_this, const char *psz_var,
     return VLC_SUCCESS;
 }
 
-void MediaInfoDialog::setInput(input_item_t *p_input)
+void MediaInfoDialog::setInput( input_item_t *p_input )
 {
     clear();
     vlc_mutex_lock( &p_input->lock );
@@ -117,7 +117,7 @@ void MediaInfoDialog::setInput(input_item_t *p_input)
 void MediaInfoDialog::update()
 {
     /* Timer runs at 150 ms, dont' update more than 2 times per second */
-    if( i_runs % 3 != 0 ) return;
+    if( i_runs % 4 != 0 ) return;
     i_runs++;
 
     /* Get Input and clear if non-existant */