Commit dabe66a7 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt4 - Make the update() update the art in mediaInfo.

parent fa0c3cd5
...@@ -173,15 +173,14 @@ void MetaPanel::update( input_item_t *p_item ) ...@@ -173,15 +173,14 @@ void MetaPanel::update( input_item_t *p_item )
UPDATE_META_INT( rating, rating_text ); UPDATE_META_INT( rating, rating_text );
#undef UPDATE_META #undef UPDATE_META
} psz_meta = p_item->p_meta->psz_arturl;
if( psz_meta && !strncmp( psz_meta, "file://", 7 ) )
void MetaPanel::setArt( QString artUrl ) {
{ QString artUrl = qfu( psz_meta ).replace( "file://",QString("" ) );
msg_Dbg( p_intf, "Trying to update art" );
if( artUrl.isNull() )
art_cover->setPixmap( QPixmap( ":/noart.png" ) );
else
art_cover->setPixmap( QPixmap( artUrl ) ); art_cover->setPixmap( QPixmap( artUrl ) );
}
else
art_cover->setPixmap( QPixmap( ":/noart.png" ) );
} }
void MetaPanel::clear(){} void MetaPanel::clear(){}
......
...@@ -74,8 +74,6 @@ private: ...@@ -74,8 +74,6 @@ private:
public slots: public slots:
void update( input_item_t * ); void update( input_item_t * );
void clear(); void clear();
private slots:
void setArt( QString );
signals: signals:
void uriSet( QString ); void uriSet( QString );
}; };
......
...@@ -92,7 +92,7 @@ MediaInfoDialog::~MediaInfoDialog() ...@@ -92,7 +92,7 @@ MediaInfoDialog::~MediaInfoDialog()
writeSettings( "mediainfo" ); writeSettings( "mediainfo" );
} }
void MediaInfoDialog::showTab(int i_tab=0) void MediaInfoDialog::showTab( int i_tab = 0 )
{ {
this->show(); this->show();
IT->setCurrentIndex( i_tab ); IT->setCurrentIndex( i_tab );
...@@ -106,7 +106,7 @@ static int ItemChanged( vlc_object_t *p_this, const char *psz_var, ...@@ -106,7 +106,7 @@ static int ItemChanged( vlc_object_t *p_this, const char *psz_var,
return VLC_SUCCESS; return VLC_SUCCESS;
} }
void MediaInfoDialog::setInput(input_item_t *p_input) void MediaInfoDialog::setInput( input_item_t *p_input )
{ {
clear(); clear();
vlc_mutex_lock( &p_input->lock ); vlc_mutex_lock( &p_input->lock );
...@@ -117,7 +117,7 @@ void MediaInfoDialog::setInput(input_item_t *p_input) ...@@ -117,7 +117,7 @@ void MediaInfoDialog::setInput(input_item_t *p_input)
void MediaInfoDialog::update() void MediaInfoDialog::update()
{ {
/* Timer runs at 150 ms, dont' update more than 2 times per second */ /* 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++; i_runs++;
/* Get Input and clear if non-existant */ /* Get Input and clear if non-existant */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment