summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBertrand Lorentz <bertrand.lorentz@gmail.com>2012-04-01 16:16:07 +0200
committerBertrand Lorentz <bertrand.lorentz@gmail.com>2012-04-01 16:16:07 +0200
commit67dac78a23961255042734112eecda0396f87777 (patch)
tree472de5c71e2393bd834848446ccac96701e0d577
parente74b72693aa0069a9368c3e7786d874fc4f07a04 (diff)
PlaylistSource: Make sure the right tracks are removed (bgo#634758)
It seems SQLite doesn't always return the rows from the CoreCache sorted by the primary key. As the query used to remove tracks from a playlist made this assumption, it would cause the wrong tracks to be removed. Adding an explicit "order by" clause should prevent this.
-rw-r--r--src/Core/Banshee.Services/Banshee.Playlist/PlaylistSource.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Core/Banshee.Services/Banshee.Playlist/PlaylistSource.cs b/src/Core/Banshee.Services/Banshee.Playlist/PlaylistSource.cs
index 360a1c6ac..f912964a4 100644
--- a/src/Core/Banshee.Services/Banshee.Playlist/PlaylistSource.cs
+++ b/src/Core/Banshee.Services/Banshee.Playlist/PlaylistSource.cs
@@ -103,7 +103,7 @@ namespace Banshee.Playlist
remove_track_range_command = new HyenaSqliteCommand (@"
DELETE FROM CorePlaylistEntries WHERE PlaylistID = ? AND
EntryID IN (SELECT ItemID FROM CoreCache
- WHERE ModelID = ? LIMIT ?, ?)"
+ WHERE ModelID = ? ORDER BY OrderID LIMIT ?, ?)"
);
}