Commit 10b303d9 authored by Rafaël Carré's avatar Rafaël Carré

Removes meta_export_t

Modify meta writer callback to take an input_item_t as argument, so a file non playing can be written
parent 295830f1
......@@ -429,7 +429,6 @@ typedef struct vlm_message_t vlm_message_t;
/* divers */
typedef struct vlc_meta_t vlc_meta_t;
typedef struct meta_export_t meta_export_t;
/* Stats */
typedef struct counter_t counter_t;
......
......@@ -227,12 +227,6 @@ enum {
ALBUM_ART_ALL
};
struct meta_export_t
{
input_item_t *p_item;
const char *psz_file;
};
#define VLC_META_ENGINE_TITLE 0x00000001
#define VLC_META_ENGINE_ARTIST 0x00000004
#define VLC_META_ENGINE_GENRE 0x00000008
......
......@@ -168,11 +168,17 @@ static int ReadMeta( vlc_object_t *p_this )
static int WriteMeta( vlc_object_t *p_this )
{
playlist_t *p_playlist = (playlist_t *)p_this;
meta_export_t *p_export = (meta_export_t *)p_playlist->p_private;
input_item_t *p_item = p_export->p_item;
input_item_t *p_item = (input_item_t *)p_this;
TagLib::FileRef f( p_export->psz_file );
char *psz_uri = p_item->psz_uri;
/* we can write meta data only in a file */
if( !strncmp( psz_uri, "file://", 7 ) )
psz_uri += 7;
/* if the file is specified with its path, not prefixed with file:// */
else if( strncmp( psz_uri, "/", 1 ) )
return VLC_EGENERIC;
TagLib::FileRef f( psz_uri );
if( !f.isNull() && f.tag() )
{
TagLib::Tag *tag = f.tag();
......
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