# HG changeset patch # User ib # Date 1354545872 0 # Node ID 9ef9131adfe506e7b610cc41dd991a79fb6fa4c9 # Parent 58a221f73d7522b77d7019eefd6b06f684764974 Provide a number of tracks information for files in playlists. diff -r 58a221f73d75 -r 9ef9131adfe5 gui/interface.c --- a/gui/interface.c Mon Dec 03 14:43:42 2012 +0000 +++ b/gui/interface.c Mon Dec 03 14:44:32 2012 +0000 @@ -241,6 +241,7 @@ if (playlist && !filename) { uiSetFile(playlist->path, playlist->name, STREAMTYPE_FILE); + guiInfo.Tracks = (int)listMgr(PLAYLIST_ITEM_GET_POS, 0); guiInfo.Track = 1; filename = NULL; // don't start playing } @@ -608,6 +609,7 @@ switch (guiInfo.StreamType) { case STREAMTYPE_FILE: case STREAMTYPE_STREAM: + guiInfo.Tracks = (int)listMgr(PLAYLIST_ITEM_GET_POS, 0); break; case STREAMTYPE_CDDA: diff -r 58a221f73d75 -r 9ef9131adfe5 gui/ui/gtk/playlist.c --- a/gui/ui/gtk/playlist.c Mon Dec 03 14:43:42 2012 +0000 +++ b/gui/ui/gtk/playlist.c Mon Dec 03 14:44:32 2012 +0000 @@ -236,6 +236,7 @@ guiInfo.PlaylistNext = (curr.name ? 0 : 1); guiInfo.Track = 1; } + guiInfo.Tracks = (int) listMgr( PLAYLIST_ITEM_GET_POS,NULL ); } else if (isPlaylistStreamtype && !guiInfo.Playing) uiUnsetFile(); free(curr.path);