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 )
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(){}
......
......@@ -74,8 +74,6 @@ private:
public slots:
void update( input_item_t * );
void clear();
private slots:
void setArt( QString );
signals:
void uriSet( QString );
};
......
......@@ -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 */
......
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