- /* Use a art finder module to find the URL */
- return VLC_EGENERIC;
-}
-
-/**
- * Download the art using the URL or an art downloaded
- * This function should be called only if data is not already in cache
- */
-int input_DownloadAndCacheArt( vlc_object_t *p_parent, input_item_t *p_item )
-{
- int i_status = VLC_EGENERIC;
- stream_t *p_stream;
- char psz_filename[MAX_PATH], psz_dir[MAX_PATH];
- char *psz_artist;
- char *psz_album;
- char *psz_type;
- psz_artist = p_item->p_meta->psz_artist;
- psz_album = p_item->p_meta->psz_album;
-
- /* You dummy ! How am I supposed to download NULL ? */
- if( !p_item->p_meta || !p_item->p_meta->psz_arturl
- || !*p_item->p_meta->psz_arturl )
- return VLC_EGENERIC;
-
- psz_type = strrchr( p_item->p_meta->psz_arturl, '.' );
-
- /* Todo: get a helper to do this */
- snprintf( psz_filename, MAX_PATH,
- "file://%s" DIR_SEP CONFIG_DIR DIR_SEP "art"
- DIR_SEP "%s" DIR_SEP "%s" DIR_SEP "art%s",
- p_parent->p_libvlc->psz_homedir,
- psz_artist, psz_album, psz_type );
-
- snprintf( psz_dir, MAX_PATH, "%s" DIR_SEP CONFIG_DIR,
- p_parent->p_libvlc->psz_homedir );
- utf8_mkdir( psz_dir );
- snprintf( psz_dir, MAX_PATH, "%s" DIR_SEP CONFIG_DIR DIR_SEP "art",
- p_parent->p_libvlc->psz_homedir );
- utf8_mkdir( psz_dir );
- snprintf( psz_dir, MAX_PATH, "%s" DIR_SEP CONFIG_DIR DIR_SEP
- "art" DIR_SEP "%s",
- p_parent->p_libvlc->psz_homedir, psz_artist );
- utf8_mkdir( psz_dir );
- snprintf( psz_dir, MAX_PATH, "%s" DIR_SEP CONFIG_DIR DIR_SEP
- "art" DIR_SEP "%s" DIR_SEP "%s",
- p_parent->p_libvlc->psz_homedir,
- psz_artist, psz_album );
- utf8_mkdir( psz_dir );
-
- /* Todo: check for stuff that needs a downloader module */
- p_stream = stream_UrlNew( p_parent, p_item->p_meta->psz_arturl );
-
- if( p_stream )