git.videolan.org
/
vlc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
7127a2d
)
* http: update meta data only on title change.
author
Laurent Aimar
<fenrir@videolan.org>
Thu, 6 Oct 2005 19:19:55 +0000
(19:19 +0000)
committer
Laurent Aimar
<fenrir@videolan.org>
Thu, 6 Oct 2005 19:19:55 +0000
(19:19 +0000)
modules/access/http.c
patch
|
blob
|
history
diff --git
a/modules/access/http.c
b/modules/access/http.c
index
fd55de0
..
b1dfffa
100644
(file)
--- a/
modules/access/http.c
+++ b/
modules/access/http.c
@@
-615,17
+615,19
@@
static int ReadICYMeta( access_t *p_access )
if( psz ) *psz = '\0';
}
if( psz ) *psz = '\0';
}
- if( p_sys->psz_icy_title ) free( p_sys->psz_icy_title );
-
- p_sys->psz_icy_title = strdup( &p[1] );
+ if( !p_sys->psz_icy_title ||
+ strcmp( p_sys->psz_icy_title, &p[1] ) )
+ {
+ if( p_sys->psz_icy_title )
+ free( p_sys->psz_icy_title );
+ p_sys->psz_icy_title = strdup( &p[1] );
+ p_access->info.i_update |= INPUT_UPDATE_META;
- p_access->info.i_update |= INPUT_UPDATE_META;
+ msg_Dbg( p_access, "New Title=%s", p_sys->psz_icy_title );
+ }
}
}
-
free( psz_meta );
free( psz_meta );
- msg_Dbg( p_access, "New Title=%s", p_sys->psz_icy_title );
-
return VLC_SUCCESS;
}
return VLC_SUCCESS;
}
@@
-698,8
+700,7
@@
static int Control( access_t *p_access, int i_query, va_list args )
case ACCESS_GET_META:
pp_meta = (vlc_meta_t**)va_arg( args, vlc_meta_t** );
*pp_meta = vlc_meta_New();
case ACCESS_GET_META:
pp_meta = (vlc_meta_t**)va_arg( args, vlc_meta_t** );
*pp_meta = vlc_meta_New();
- msg_Dbg( p_access, "GET META %s %s %s",
- p_sys->psz_icy_name, p_sys->psz_icy_genre, p_sys->psz_icy_title );
+
if( p_sys->psz_icy_name )
vlc_meta_Add( *pp_meta, VLC_META_TITLE,
p_sys->psz_icy_name );
if( p_sys->psz_icy_name )
vlc_meta_Add( *pp_meta, VLC_META_TITLE,
p_sys->psz_icy_name );