mirror of
https://github.com/videolan/vlc.git
synced 2024-12-01 13:55:14 +08:00
* modules/gui/wxwindows/playlist.cpp: when duration is not known, don't display (--:--:--)
This commit is contained in:
parent
8313b721e3
commit
153deb49b1
2
TODO
2
TODO
@ -45,7 +45,7 @@ Platform: any
|
||||
Urgency: Important
|
||||
Description: proper DVD controls
|
||||
Most importantly a proper button that will take you straight to the DVD menu. But also, next/prev chapter should be integrated with next/prev playlistitem.
|
||||
Status: Todo
|
||||
Status: Assigned to yoann (done)
|
||||
|
||||
Task
|
||||
Difficulty: Easy
|
||||
|
@ -516,26 +516,27 @@ void Playlist::UpdateTreeItem( playlist_t *p_playlist, wxTreeItemId item )
|
||||
}
|
||||
|
||||
wxString msg;
|
||||
wxString duration = wxU( "" );
|
||||
char *psz_author = playlist_ItemGetInfo( p_item, _("Meta-information"),
|
||||
_("Artist"));
|
||||
char psz_duration[MSTRTIME_MAX_SIZE];
|
||||
mtime_t dur = p_item->input.i_duration;
|
||||
|
||||
if( dur != -1 )
|
||||
{
|
||||
secstotimestr( psz_duration, dur/1000000 );
|
||||
else
|
||||
memcpy( psz_duration, "-:--:--", sizeof("-:--:--") );
|
||||
duration.Append( wxU( " ( " ) + wxString( wxU( psz_duration ) ) +
|
||||
wxU( ")" ) );
|
||||
}
|
||||
|
||||
if( !strcmp( psz_author, "" ) || p_item->input.b_fixed_name == VLC_TRUE )
|
||||
{
|
||||
msg.Printf( wxString( wxU( p_item->input.psz_name ) ) + wxU( " ( ") +
|
||||
wxString(wxU(psz_duration ) ) + wxU( ")") );
|
||||
msg.Printf( wxString( wxU( p_item->input.psz_name ) ) + duration );
|
||||
}
|
||||
else
|
||||
{
|
||||
msg.Printf( wxString(wxU( psz_author )) + wxT(" - ") +
|
||||
wxString(wxU(p_item->input.psz_name)) + wxU( " ( ") +
|
||||
wxString(wxU(psz_duration ) ) + wxU( ")") );
|
||||
wxString(wxU(p_item->input.psz_name)) + duration );
|
||||
}
|
||||
treectrl->SetItemText( item , msg );
|
||||
treectrl->SetItemImage( item, p_item->input.i_type );
|
||||
|
Loading…
Reference in New Issue
Block a user