[banshee] Revert "[Dap.Ipod] Save URIs when syncing to fix inconsistency (BGO#620826)"
- From: Andrés Aragoneses <aaragoneses src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee] Revert "[Dap.Ipod] Save URIs when syncing to fix inconsistency (BGO#620826)"
- Date: Tue, 14 Sep 2010 21:49:31 +0000 (UTC)
commit 863fd6e52fb0cf091106c5763e688392aecc3bff
Author: Andrés G. Aragoneses <knocte gmail com>
Date: Tue Sep 14 23:44:44 2010 +0200
Revert "[Dap.Ipod] Save URIs when syncing to fix inconsistency (BGO#620826)"
This reverts commit 5ad2a4d6b6dd7a7c03727b61ddbaf7ee51c1cd07,
because it used the wrong approach. Check bugzilla for details.
.../Banshee.Dap.Ipod/IpodTrackInfo.cs | 23 +++++--------------
1 files changed, 6 insertions(+), 17 deletions(-)
---
diff --git a/src/Dap/Banshee.Dap.Ipod/Banshee.Dap.Ipod/IpodTrackInfo.cs b/src/Dap/Banshee.Dap.Ipod/Banshee.Dap.Ipod/IpodTrackInfo.cs
index f7a3d33..e35521a 100644
--- a/src/Dap/Banshee.Dap.Ipod/Banshee.Dap.Ipod/IpodTrackInfo.cs
+++ b/src/Dap/Banshee.Dap.Ipod/Banshee.Dap.Ipod/IpodTrackInfo.cs
@@ -189,25 +189,14 @@ namespace Banshee.Dap.Ipod
public void CommitToIpod (IPod.Device device)
{
- bool update = (track != null);
- if (!update) {
- try {
- track = device.TrackDatabase.CreateTrack (Uri.AbsolutePath);
- } catch (Exception e) {
- Log.Exception ("Failed to create iPod track with Uri " + Uri.AbsoluteUri, e);
- device.TrackDatabase.RemoveTrack (track);
- return;
- }
- }
-
+ track = track ?? device.TrackDatabase.CreateTrack ();
ExternalId = track.Id;
- //if the track was not in the ipod already, the CreateTrack(uri)
- //method updates the Uri property with the path of the new file
- //so we need to save it on Banshee db to be properly synced
- if (!update) {
- Uri = new SafeUri (track.Uri);
- Save ();
+ try {
+ track.Uri = new Uri (Uri.AbsoluteUri);
+ } catch (Exception e) {
+ Log.Exception ("Failed to create System.Uri for iPod track", e);
+ device.TrackDatabase.RemoveTrack (track);
}
track.AlbumArtist = AlbumArtist;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]