Changeset 222b887fd6fe6d7243aeddac082c18e019eb2081

Show
Ignore:
Timestamp:
26/08/07 21:59:02 (1 year ago)
Author:
Ilkka Ollakka <ileoo@videolan.org>
git-committer:
Ilkka Ollakka <ileoo@videolan.org> 1188158342 +0000
git-parent:

[1f7cabafa35a48364d348778bfb8f47618c24518]

git-author:
Ilkka Ollakka <ileoo@videolan.org> 1188158342 +0000
Message:

xspf.c: add album-art as <image> and use Title in title (if available),
xspf-specs seems to agree that it's valid this way. (title tag MAY
appear once in item)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/demux/playlist/xspf.c

    re02432e r222b887  
    156156          {"location",     SIMPLE_CONTENT,  {NULL} }, 
    157157          {"identifier",   SIMPLE_CONTENT,  {NULL} }, 
    158           {"image",        SIMPLE_CONTENT,  {NULL} }, 
     158          {"image",        SIMPLE_CONTENT,  {.smpl = set_item_info} }, 
    159159          {"date",         SIMPLE_CONTENT,  {NULL} }, 
    160160          {"license",      SIMPLE_CONTENT,  {NULL} }, 
     
    387387          {"annotation",   SIMPLE_CONTENT,  {.smpl = set_item_info} }, 
    388388          {"info",         SIMPLE_CONTENT,  {NULL} }, 
    389           {"image",        SIMPLE_CONTENT,  {NULL} }, 
     389          {"image",        SIMPLE_CONTENT,  {.smpl = set_item_info} }, 
    390390          {"album",        SIMPLE_CONTENT,  {.smpl = set_item_info} }, 
    391391          {"trackNum",     SIMPLE_CONTENT,  {.smpl = set_item_info} }, 
     
    611611    if( !strcmp( psz_name, "title" ) ) 
    612612    { 
    613         p_input->psz_name = strdup( (char*)psz_value ); 
     613        input_item_SetTitle( p_input, psz_value ); 
    614614    } 
    615615    else if( !strcmp( psz_name, "creator" ) ) 
     
    634634    { 
    635635        input_item_SetDescription( p_input, psz_value ); 
     636    } 
     637    else if( !strcmp( psz_name, "image" ) ) 
     638    { 
     639        input_item_SetArtURL( p_input, psz_value ); 
    636640    } 
    637641    return VLC_TRUE; 
  • modules/misc/playlist/xspf.c

    re02432e r222b887  
    151151 
    152152    /* -> the name/title (only if different from uri)*/ 
    153     char *psz_name = input_item_GetName( p_item->p_input ); 
     153    char *psz_name = input_item_GetTitle( p_item->p_input ); 
    154154    if( psz_name && psz_uri && strcmp( psz_uri, psz_name ) ) 
    155155    { 
     
    211211    } 
    212212    free( psz_temp ); 
     213 
     214    psz = input_item_GetArtURL( p_item->p_input ); 
     215    if( !EMPTY_STR( psz ) ) 
     216    { 
     217        fprintf( p_file, "\t\t\t<image>%s</image>\n", psz ); 
     218    } 
     219    free( psz ); 
    213220 
    214221xspfexportitem_end: