[banshee/stable-2.4] 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/stable-2.4] PlaylistSource: Make sure the right tracks are removed (bgo#634758)
- Date: Sun, 20 May 2012 17:26:45 +0000 (UTC)
commit eb4fc8f1c857d1b6141fcdc0e3d56460997767ef
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]