diff options
author | phintuka <phintuka> | 2012-08-29 19:23:15 +0000 |
---|---|---|
committer | phintuka <phintuka> | 2012-08-29 19:23:15 +0000 |
commit | 541b4795ce5ea0d48bcabee0e341aa4143a2f85a (patch) | |
tree | 508b337a38b3c1cb04fb9b39f4d2bd06eea9719e | |
parent | c3fddcc3b151a023fdf60ffb792c52640610dd10 (diff) | |
download | xineliboutput-541b4795ce5ea0d48bcabee0e341aa4143a2f85a.tar.gz xineliboutput-541b4795ce5ea0d48bcabee0e341aa4143a2f85a.tar.bz2 |
Add title and track number to audio CD playlist items
-rw-r--r-- | media_player.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/media_player.c b/media_player.c index 7ab5529c..1826803f 100644 --- a/media_player.c +++ b/media_player.c @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: media_player.c,v 1.92 2012-03-19 11:07:52 phintuka Exp $ + * $Id: media_player.c,v 1.93 2012-08-29 19:23:15 phintuka Exp $ * */ @@ -248,8 +248,11 @@ void cXinelibPlayer::UpdateNumTracks(void) if(m_Playlist.Count() == 1 && !strcmp("cdda:/", m_Playlist.First()->Filename)) { int count = m_Dev->PlayFileCtrl("GETAUTOPLAYSIZE CD", 10000); if(count>0) { - for(int i=0; i<count; i++) + for(int i=0; i<count; i++) { m_Playlist.Read(cString::sprintf("cdda:/%d", i+1)); + m_Playlist.Last()->Title = cString::sprintf("Track %d", i + 1); + m_Playlist.Last()->Tracknumber = cString::sprintf("%d/%d", i + 1, count); + } m_Playlist.Del(m_Playlist.First()); } } |