#include <vlc_playlist.h>
#include <vlc_charset.h>
#include <vlc_strings.h>
+#include "input_internal.h"
#include "../playlist/playlist_internal.h"
#include <errno.h>
#include <limits.h> /* PATH_MAX */
/* If we already checked this album in this session, skip */
if( psz_artist && psz_album )
{
- FOREACH_ARRAY( playlist_album_t album, p_playlist->p_fetcher->albums )
+ FOREACH_ARRAY( playlist_album_t album, pl_priv(p_playlist)->fetcher.albums )
if( !strcmp( album.psz_artist, psz_artist ) &&
!strcmp( album.psz_album, psz_album ) )
{
}
free( psz_title );
- p_module = module_Need( p_playlist, "art finder", 0, false );
+ p_module = module_need( p_playlist, "art finder", 0, false );
if( p_module )
i_ret = 1;
a.psz_album = psz_album;
a.psz_arturl = input_item_GetArtURL( p_item );
a.b_found = (i_ret == VLC_EGENERIC ? false : true );
- ARRAY_APPEND( p_playlist->p_fetcher->albums, a );
+ ARRAY_APPEND( pl_priv(p_playlist)->fetcher.albums, a );
}
else
{
}
if( p_module )
- module_Unneed( p_playlist, p_module );
+ module_unneed( p_playlist, p_module );
p_playlist->p_private = NULL;
PL_UNLOCK;
const char *psz_title,
const char *psz_artist, const char *psz_album )
{
- char *psz_cachedir = config_GetCacheDir();
+ (void)p_obj;
+ char *psz_cachedir = config_GetCacheDir();
if( !EMPTY_STR(psz_artist) && !EMPTY_STR(psz_album) )
{
void input_ExtractAttachmentAndCacheArt( input_thread_t *p_input )
{
- input_item_t *p_item = p_input->p->input.p_item;
+ input_item_t *p_item = p_input->p->p_item;
const char *psz_arturl;
const char *psz_artist = NULL;
const char *psz_album = NULL;
psz_title = p_item->psz_name;
if( (!psz_artist || !psz_album ) && !psz_title )
+ {
+ free( psz_type );
return;
+ }
ArtCacheGetDirPath( p_input, psz_filename, psz_title, psz_artist, psz_album );
ArtCacheCreateDir( psz_filename );