[banshee] PlaylistSource: Make sure the right tracks are removed (bgo#634758)
- From: Bertrand Lorentz <blorentz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee] PlaylistSource: Make sure the right tracks are removed (bgo#634758)
- Date: Sun, 1 Apr 2012 14:25:44 +0000 (UTC)
commit 67dac78a23961255042734112eecda0396f87777
Author: Bertrand Lorentz <bertrand lorentz gmail com>
Date: Sun Apr 1 16:16:07 2012 +0200
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.
.../Banshee.Playlist/PlaylistSource.cs | 2 +-
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 360a1c6..f912964 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 ?, ?)"
);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]