[vlc-devel] [PATCH 3/3] Add file dialogue to manually set album art.
Jean-Baptiste Kempf
jb at videolan.org
Sat Jul 28 23:10:58 CEST 2012
On Sat, Jul 28, 2012 at 04:39:36PM +0200, vlc-devel at szanni.org wrote :
> - QAction *action = new QAction( qtr( "Download cover art" ), this );
> - CONNECT( action, triggered(), this, askForUpdate() );
> - addAction( action );
> + QAction *action_download = new QAction( qtr( "Download cover art" ), this );
> + CONNECT( action_download, triggered(), this, askForUpdate() );
> + addAction( action_download );
> +
> + QAction *action_from_file = new QAction( qtr( "Cover art from file" ), this );
> + CONNECT( action_from_file, triggered(), this, setArtFromFile() );
> + addAction( action_from_file );
You do not relly need 2 different QAction here,, but well...
> + input_item_t *_p_item = p_item;
Why?
> + char *psz_cachedir = config_GetUserDir( VLC_CACHE_DIR );
> + QString old_url = THEMIM->getIM()->decodeArtURL( p_item );
> +
> + if( old_url.startsWith( QString( psz_cachedir ) ) )
> + QFile( old_url ).remove(); /* Purge cached artwork */
> +
> + free( psz_cachedir );
> +
> + input_item_SetArtURL( p_item , fileUrl.toLocal8Bit().data() );
> + UpdateArt();
I do not really understand what you are trying to do here, to be
honest...
Best regards,
--
Jean-Baptiste Kempf
http://www.jbkempf.com/ - +33 672 704 734
Sent from my Electronic Device
More information about the vlc-devel
mailing list