-#ifdef HAVE_AVAHI_CLIENT
- p_playlist = (playlist_t *)vlc_object_find( p_access, VLC_OBJECT_PLAYLIST,
- FIND_ANYWHERE );
- if( p_playlist == NULL )
- {
- msg_Err( p_access, "unable to find playlist" );
- httpd_HostDelete( p_sys->p_httpd_host );
- free( (void *)psz_txt );
- free( (void *)p_sys );
- return VLC_EGENERIC;
- }
+ psz_name = strrchr( p_playlist->status.p_item->input.psz_uri,
+ DIRECTORY_SEPARATOR );
+ if( psz_name != NULL ) psz_name++;
+ else psz_name = p_playlist->status.p_item->input.psz_uri;
+
+ asprintf( &psz_txt, "path=%s", psz_file_name );