[banshee] [Dap.MassStorage] .is_not_audio_player usage (bgo#535323)
- From: Alexander Kojevnikov <alexk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee] [Dap.MassStorage] .is_not_audio_player usage (bgo#535323)
- Date: Sun, 4 Apr 2010 01:49:00 +0000 (UTC)
commit 376537cf8ae2d0ee3d4aa7816800d534e6688f8c
Author: Jeroen Budts <jeroen lightyear be>
Date: Sun Apr 4 11:46:58 2010 +1000
[Dap.MassStorage] .is_not_audio_player usage (bgo#535323)
Ignore devices with a .is_not_audio_player
Signed-off-by: Alexander Kojevnikov <alexander kojevnikov com>
.../Banshee.Dap.MassStorage/MassStorageDevice.cs | 9 +++++++++
.../Banshee.Dap.MassStorage/MassStorageSource.cs | 2 +-
2 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/src/Dap/Banshee.Dap.MassStorage/Banshee.Dap.MassStorage/MassStorageDevice.cs b/src/Dap/Banshee.Dap.MassStorage/Banshee.Dap.MassStorage/MassStorageDevice.cs
index 515f57d..5da5a9a 100644
--- a/src/Dap/Banshee.Dap.MassStorage/Banshee.Dap.MassStorage/MassStorageDevice.cs
+++ b/src/Dap/Banshee.Dap.MassStorage/Banshee.Dap.MassStorage/MassStorageDevice.cs
@@ -68,6 +68,11 @@ namespace Banshee.Dap.MassStorage
return true;
}
+ public virtual bool ShouldIgnoreDevice ()
+ {
+ return File.Exists (IsNotAudioPlayerPath);
+ }
+
public virtual bool LoadDeviceConfiguration ()
{
string path = IsAudioPlayerPath;
@@ -167,6 +172,10 @@ namespace Banshee.Dap.MassStorage
get { return System.IO.Path.Combine (source.Volume.MountPoint, ".is_audio_player"); }
}
+ private string IsNotAudioPlayerPath {
+ get { return System.IO.Path.Combine (source.Volume.MountPoint, ".is_not_audio_player"); }
+ }
+
protected virtual string DefaultName {
get { return source.Volume.Name; }
}
diff --git a/src/Dap/Banshee.Dap.MassStorage/Banshee.Dap.MassStorage/MassStorageSource.cs b/src/Dap/Banshee.Dap.MassStorage/Banshee.Dap.MassStorage/MassStorageSource.cs
index 466e05b..40942a8 100644
--- a/src/Dap/Banshee.Dap.MassStorage/Banshee.Dap.MassStorage/MassStorageSource.cs
+++ b/src/Dap/Banshee.Dap.MassStorage/Banshee.Dap.MassStorage/MassStorageSource.cs
@@ -68,7 +68,7 @@ namespace Banshee.Dap.MassStorage
ms_device = DeviceMapper.Map (this);
try {
- if (!ms_device.LoadDeviceConfiguration ()) {
+ if (ms_device.ShouldIgnoreDevice () || !ms_device.LoadDeviceConfiguration ()) {
ms_device = null;
}
} catch {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]