[banshee] [AppleDevice] Don't blindly mount every unmounted volume.



commit 321e5b7ef04da063e55c1b3db7d01e2b2559eeec
Author: Alan McGovern <alan mcgovern gmail com>
Date:   Wed Sep 29 01:00:04 2010 +0100

    [AppleDevice] Don't blindly mount every unmounted volume.
    
    Add some smarts to AppleDeviceSource so that it only automounts
    unmounted volumes which have mediacapabilities of type 'ipod'. This
    detection relies on the media-player-info package being installed which
    not every distro does by default.

 .../Banshee.Dap.AppleDevice/AppleDeviceSource.cs   |    7 ++++++-
 1 files changed, 6 insertions(+), 1 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 fdb4f95..1c9eac2 100644
--- a/src/Dap/Banshee.Dap.AppleDevice/Banshee.Dap.AppleDevice/AppleDeviceSource.cs
+++ b/src/Dap/Banshee.Dap.AppleDevice/Banshee.Dap.AppleDevice/AppleDeviceSource.cs
@@ -68,11 +68,16 @@ namespace Banshee.Dap.AppleDevice
                 throw new InvalidDeviceException ();
             }
 
-            if (!Volume.IsMounted && MediaCapabilities != null) {
+            if (!Volume.IsMounted && device.MediaCapabilities != null && device.MediaCapabilities.IsType ("ipod")) {
                 Hyena.Log.Information ("Found potential unmounted iDevice, trying to mount it now");
                 Volume.Mount ();
             }
 
+            if (!Volume.IsMounted) {
+                Hyena.Log.Information ("AppleDeviceSource is ignoring unmounted volume " + Volume.Name);
+                throw new InvalidOperationException ();
+            }
+            
             Device = new GPod.Device (Volume.MountPoint);
 
             if (GPod.ITDB.GetControlPath (Device) == null) {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]