changeset 35488:9ef9131adfe5

Provide a number of tracks information for files in playlists.
author ib
date Mon, 03 Dec 2012 14:44:32 +0000
parents 58a221f73d75
children 214c3f971eb0
files gui/interface.c gui/ui/gtk/playlist.c
diffstat 2 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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:
--- 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);