[banshee] AppleDeviceSource: Fix items disappearing in playlists on re-connect
- From: Bertrand Lorentz <blorentz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee] AppleDeviceSource: Fix items disappearing in playlists on re-connect
- Date: Tue, 23 Aug 2011 18:29:19 +0000 (UTC)
commit f7358b2b89b2f8a3e87a67ee7968e00805129296
Author: Chase Geigle <sky skystrife com>
Date: Thu May 12 12:08:03 2011 -0500
AppleDeviceSource: Fix items disappearing in playlists on re-connect
We store GPod.Track.DBID in the ExternalID field, which is handled as a
long, so we need an explicit cast. Fixes bgo#650011.
Signed-off-by: Bertrand Lorentz <bertrand lorentz gmail com>
.../Banshee.Dap.AppleDevice/AppleDeviceSource.cs | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/Dap/Banshee.Dap.AppleDevice/Banshee.Dap.AppleDevice/AppleDeviceSource.cs b/src/Dap/Banshee.Dap.AppleDevice/Banshee.Dap.AppleDevice/AppleDeviceSource.cs
index 561cc66..a73e6ef 100644
--- a/src/Dap/Banshee.Dap.AppleDevice/Banshee.Dap.AppleDevice/AppleDeviceSource.cs
+++ b/src/Dap/Banshee.Dap.AppleDevice/Banshee.Dap.AppleDevice/AppleDeviceSource.cs
@@ -238,10 +238,11 @@ namespace Banshee.Dap.AppleDevice
PlaylistSource pl_src = new PlaylistSource (playlist.Name, this);
pl_src.Save ();
- // We use the IPod.Track.Id here b/c we just shoved it into ExternalID above when we loaded
- // the tracks, however when we sync, the Track.Id values may/will change.
+ // We use the GPod.Track.DBID here b/c we just shoved it into ExternalID above when we loaded
+ // the tracks, however when we sync, the Track.DBID values may/will change.
foreach (var track in playlist.Tracks) {
- ServiceManager.DbConnection.Execute (insert_cmd, pl_src.DbId, this.DbId, track.DBID);
+ // DBID will be stored in a long, so we need to cast it. See bgo#650011
+ ServiceManager.DbConnection.Execute (insert_cmd, pl_src.DbId, this.DbId, (long) track.DBID);
}
pl_src.UpdateCounts ();
AddChildSource (pl_src);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]