[banshee] PlayQueueSource: Fix track prepending
- From: Alexander Kojevnikov <alexk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee] PlayQueueSource: Fix track prepending
- Date: Sun, 30 Jan 2011 08:07:44 +0000 (UTC)
commit a3f266a5e2322baadad6c702aa8ec949c71e4f3a
Author: Alexander Kojevnikov <alexander kojevnikov com>
Date: Sun Jan 30 16:05:53 2011 +0800
PlayQueueSource: Fix track prepending
...when the queue is not playing (bgo#636435)
.../Banshee.PlayQueue/PlayQueueSource.cs | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)
---
diff --git a/src/Extensions/Banshee.PlayQueue/Banshee.PlayQueue/PlayQueueSource.cs b/src/Extensions/Banshee.PlayQueue/Banshee.PlayQueue/PlayQueueSource.cs
index 13ed474..ab8113a 100644
--- a/src/Extensions/Banshee.PlayQueue/Banshee.PlayQueue/PlayQueueSource.cs
+++ b/src/Extensions/Banshee.PlayQueue/Banshee.PlayQueue/PlayQueueSource.cs
@@ -246,13 +246,11 @@ namespace Banshee.PlayQueue
long view_order;
if (prepend && current_track != null) {
// We are going to prepend the track to the play queue, which means
- // adding it after the current_track. Now find the corresponding view_order.
- view_order = ServiceManager.DbConnection.Query<long> (@"
- SELECT ViewOrder + 1
- FROM CorePlaylistEntries
- WHERE PlaylistID = ? AND EntryID = ?",
- DbId, Convert.ToInt64 (current_track.CacheEntryId)
- );
+ // adding it after the current_track.
+ view_order = CurrentTrackViewOrder;
+ if (ServiceManager.PlayerEngine.IsPlaying (current_track)) {
+ view_order++;
+ }
} else {
if (generated) {
// view_order will point after the last track in the queue.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]