banshee r3258 - in trunk/banshee: . src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Radio



Author: gburt
Date: Sun Feb 17 04:02:56 2008
New Revision: 3258
URL: http://svn.gnome.org/viewvc/banshee?rev=3258&view=rev

Log:
2008-02-16  Gabriel Burt  <gabriel burt gmail com>

	* src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Radio/StationSource.cs:
	Only keep the last five played or skipped songs.


Modified:
   trunk/banshee/ChangeLog
   trunk/banshee/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Radio/StationSource.cs

Modified: trunk/banshee/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Radio/StationSource.cs
==============================================================================
--- trunk/banshee/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Radio/StationSource.cs	(original)
+++ trunk/banshee/src/Extensions/Banshee.Lastfm/Banshee.Lastfm.Radio/StationSource.cs	Sun Feb 17 04:02:56 2008
@@ -370,6 +370,15 @@
                 CurrentTrack = ServiceManager.PlayerEngine.CurrentTrack;
 
                 lock (track_model) {
+                    // Remove up to the 5 most-recent tracks
+                    if (current_track > 5) {
+                        for (int i = 0; i < (current_track - 5); i++) {
+                            track_model.Remove (track_model[0]);
+                        }
+                        current_track = 5;
+                    }
+
+                    // Set all previous tracks as CanPlay = false
                     foreach (TrackInfo track in track_model) {
                         if (track == CurrentTrack)
                             break;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]