#include "qt4.hpp"
#include "components/info_panels.hpp"
+#include "components/interface_widgets.hpp"
#include <QTreeWidget>
#include <QListView>
line++;
/* ART_URL */
- art_cover = new QLabel( "" );
- art_cover->setMinimumHeight( 128 );
- art_cover->setMinimumWidth( 128 );
- art_cover->setMaximumHeight( 128 );
- art_cover->setMaximumWidth( 128 );
- art_cover->setScaledContents( true );
- art_cover->setPixmap( QPixmap( ":/noart.png" ) );
+ art_cover = new CoverArtLabel( VLC_OBJECT( p_intf ) );
metaLayout->addWidget( art_cover, line, 8, 4, 2, Qt::AlignRight );
/* Settings is unused */
nowplaying_text->setReadOnly( true );
ADD_META_2( VLC_META_PUBLISHER, publisher_text );
ADD_META_2( VLC_META_COPYRIGHT, copyright_text );
- ADD_META_2( "Comments", description_text );
+ ADD_META_2( N_("Comments"), description_text );
/* useless metadata */
/* URL / URI */
psz_meta = input_item_GetURL( p_item );
if( !EMPTY_STR( psz_meta ) )
- {
emit uriSet( QString( psz_meta ) );
- free( psz_meta );
- }
else
{
free( psz_meta );
if( !EMPTY_STR( psz_meta ) )
emit uriSet( QString( psz_meta ) );
}
+ free( psz_meta );
/* Other classic though */
UPDATE_META( Artist, artist_text );
#undef UPDATE_META_INT
#undef UPDATE_META
- /* Art Urls */
- psz_meta = input_item_GetArtURL( p_item );
- 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" ) );
- free( psz_meta );
+ /* Update Art */
+ art_cover->update( p_item );
}
/**
if( p_mod )
module_Unneed( p_playlist, p_mod );
PL_UNLOCK;
- pl_Release( p_playlist );
+ pl_Release( p_intf );
/* Reset the status of the mode. No need to emit any signal because parent
is the only caller */
language_text->clear();
nowplaying_text->clear();
publisher_text->clear();
- art_cover;
+ art_cover->update( NULL );
setEditMode( false );
}
vlc_mutex_lock( &p_item->lock );
vlc_meta_t *p_meta = p_item->p_meta;
if( !p_meta )
+ {
+ vlc_mutex_unlock( &p_item->lock );
return;
+ }
vlc_dictionary_t * p_dict = &p_meta->extra_tags;
char ** ppsz_allkey = vlc_dictionary_all_keys( p_dict );