[banshee] Fixed an exception: there is no CoreTracks.DiscNumber column



commit ca4dc2128dbfa5405c0d02db909e0aaed8df29d2
Author: Alexander Kojevnikov <alexander kojevnikov com>
Date:   Wed Jun 3 12:30:16 2009 +1000

    Fixed an exception: there is no CoreTracks.DiscNumber column
---
 .../DatabaseTrackListModel.cs                      |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseTrackListModel.cs b/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseTrackListModel.cs
index fdd1f77..69bc953 100644
--- a/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseTrackListModel.cs
+++ b/src/Core/Banshee.Services/Banshee.Collection.Database/DatabaseTrackListModel.cs
@@ -341,8 +341,8 @@ namespace Banshee.Collection.Database
 
         private const string random_condition = "AND LastStreamError = 0 AND (LastPlayedStamp < ? OR LastPlayedStamp IS NULL) AND (LastSkippedStamp < ? OR LastSkippedStamp IS NULL)";
         private static string random_fragment = String.Format ("{0} ORDER BY RANDOM()", random_condition);
-        private static string random_by_album_fragment = String.Format ("AND CoreTracks.AlbumID = ? {0} ORDER BY DiscNumber ASC, TrackNumber ASC", random_condition);
-        private static string random_by_artist_fragment = String.Format ("AND CoreAlbums.ArtistID = ? {0} ORDER BY CoreAlbums.TitleSortKey ASC, DiscNumber ASC, TrackNumber ASC", random_condition);
+        private static string random_by_album_fragment = String.Format ("AND CoreTracks.AlbumID = ? {0} ORDER BY Disc ASC, TrackNumber ASC", random_condition);
+        private static string random_by_artist_fragment = String.Format ("AND CoreAlbums.ArtistID = ? {0} ORDER BY CoreAlbums.TitleSortKey ASC, Disc ASC, TrackNumber ASC", random_condition);
 
         private DateTime random_began_at = DateTime.MinValue;
         private DateTime last_random = DateTime.MinValue;



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