[banshee] [AppleDevice] Update AppleDevice to use latest gpod-sharp GetXXXDir methods
- From: Alex Launi <alexlauni src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee] [AppleDevice] Update AppleDevice to use latest gpod-sharp GetXXXDir methods
- Date: Thu, 19 Aug 2010 18:21:18 +0000 (UTC)
commit 6a7d0489b0a6da87ef17eec6e7654555cf6b7aac
Author: Alex Launi <alex launi gmail com>
Date: Thu Aug 19 14:20:06 2010 -0400
[AppleDevice] Update AppleDevice to use latest gpod-sharp GetXXXDir methods
Fixes broken compilation.
.../Banshee.Dap.AppleDevice/AppleDeviceSource.cs | 21 +++++++++----------
1 files changed, 10 insertions(+), 11 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 9b12826..59a6d8b 100644
--- a/src/Dap/Banshee.Dap.AppleDevice/Banshee.Dap.AppleDevice/AppleDeviceSource.cs
+++ b/src/Dap/Banshee.Dap.AppleDevice/Banshee.Dap.AppleDevice/AppleDeviceSource.cs
@@ -54,27 +54,26 @@ namespace Banshee.Dap.AppleDevice
get; set;
}
- string MountPoint {
- get { return Device.Mountpoint; }
- }
-
private Dictionary<int, AppleDeviceTrackInfo> tracks_map = new Dictionary<int, AppleDeviceTrackInfo> (); // FIXME: EPIC FAIL
- //private UnsupportedDatabaseView unsupported_view;
-
#region Device Setup/Dispose
public override void DeviceInitialize (IDevice device)
{
Volume = device as IVolume;
- if (Volume == null || !(Volume.FileSystem == "afc" || GPod.ITDB.GetControlPath (Volume.MountPoint) != null)) {
+ if (Volume == null) {
+ throw new InvalidDeviceException ();
+ }
+
+ Device = new GPod.Device (Volume.MountPoint);
+
+ if (GPod.ITDB.GetControlPath (Device) == null) {
throw new InvalidDeviceException ();
}
base.DeviceInitialize (device);
- Device = new GPod.Device (Volume.MountPoint);
Name = Volume.Name;
SupportsPlaylists = true;
SupportsPodcasts = Device.SupportsPodcast;
@@ -173,7 +172,7 @@ namespace Banshee.Dap.AppleDevice
if (MediaDatabase != null)
MediaDatabase.Dispose ();
- MediaDatabase = new GPod.ITDB (MountPoint);
+ MediaDatabase = new GPod.ITDB (Device.Mountpoint);
}
foreach (var ipod_track in MediaDatabase.Tracks) {
@@ -369,7 +368,7 @@ namespace Banshee.Dap.AppleDevice
public override void Import ()
{
- Banshee.ServiceStack.ServiceManager.Get<LibraryImportManager> ().Enqueue (GPod.ITDB.GetMusicPath (MountPoint));
+ Banshee.ServiceStack.ServiceManager.Get<LibraryImportManager> ().Enqueue (GPod.ITDB.GetMusicPath (Device));
}
public override void CopyTrackTo (DatabaseTrackInfo track, SafeUri uri, BatchUserJob job)
@@ -530,7 +529,7 @@ namespace Banshee.Dap.AppleDevice
playlist.Tracks.Remove (track.IpodTrack);
MediaDatabase.MasterPlaylist.Tracks.Remove (track.IpodTrack);
MediaDatabase.Tracks.Remove (track.IpodTrack);
- Banshee.IO.File.Delete (new SafeUri (GPod.ITDB.GetLocalPath (MountPoint, track.IpodTrack)));
+ Banshee.IO.File.Delete (new SafeUri (GPod.ITDB.GetLocalPath (Device, track.IpodTrack)));
} else {
Log.Error ("The ipod track was null");
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]