[podsleuth] Add ipod.images.sparse_album_art_supported prop



commit 2842a815ee1e26a716d0e9a5c398774c5ec791d6
Author: Andy Clayton <clayt055 umn edu>
Date:   Wed Jan 20 18:19:59 2010 -0800

    Add ipod.images.sparse_album_art_supported prop
    
    Signed-off-by: Gabriel Burt <gabriel burt gmail com>

 .../PodSleuth.HalFrontend/HalClient.cs             |    1 +
 .../PodSleuth.HalFrontend/HalPopulator.cs          |    1 +
 src/PodSleuth/PodSleuth/Device.cs                  |    9 +++++++++
 3 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/src/PodSleuth.Hal/PodSleuth.HalFrontend/HalClient.cs b/src/PodSleuth.Hal/PodSleuth.HalFrontend/HalClient.cs
index aebb742..889b717 100644
--- a/src/PodSleuth.Hal/PodSleuth.HalFrontend/HalClient.cs
+++ b/src/PodSleuth.Hal/PodSleuth.HalFrontend/HalClient.cs
@@ -288,6 +288,7 @@ namespace PodSleuth.HalFrontend
             Console.WriteLine("  * Image Types Supported");
             Console.WriteLine("    - Photos:             {0}", volume.GetPropertyBoolean(HalNamespace + "ipod.images.photos_supported"));
             Console.WriteLine("    - Album Art:          {0}", volume.GetPropertyBoolean(HalNamespace + "ipod.images.album_art_supported"));
+            Console.WriteLine("    - Sparse Album Art:   {0}", volume.GetPropertyBoolean(HalNamespace + "ipod.images.sparse_album_art_supported"));
             Console.WriteLine("    - Chapter Images:     {0}", volume.GetPropertyBoolean(HalNamespace + "ipod.images.chapter_images_supported"));
             
             if(arguments.ContainsKey("show-image-formats")) {
diff --git a/src/PodSleuth.Hal/PodSleuth.HalFrontend/HalPopulator.cs b/src/PodSleuth.Hal/PodSleuth.HalFrontend/HalPopulator.cs
index 13a393b..69ec7a4 100644
--- a/src/PodSleuth.Hal/PodSleuth.HalFrontend/HalPopulator.cs
+++ b/src/PodSleuth.Hal/PodSleuth.HalFrontend/HalPopulator.cs
@@ -107,6 +107,7 @@ namespace PodSleuth.HalFrontend
             
             hal_device.SetPropertyBoolean(HalNamespace + "ipod.images.photos_supported", pod_device.PhotosSupported);
             hal_device.SetPropertyBoolean(HalNamespace + "ipod.images.album_art_supported", pod_device.AlbumArtSupported);
+            hal_device.SetPropertyBoolean(HalNamespace + "ipod.images.sparse_album_art_supported", pod_device.SparseAlbumArtSupported);
             hal_device.SetPropertyBoolean(HalNamespace + "ipod.images.chapter_images_supported", pod_device.ChapterImagesSupported);
             
             if(hal_device.PropertyExists(HalNamespace + "ipod.images.formats")) {
diff --git a/src/PodSleuth/PodSleuth/Device.cs b/src/PodSleuth/PodSleuth/Device.cs
index 1001e60..7645d70 100644
--- a/src/PodSleuth/PodSleuth/Device.cs
+++ b/src/PodSleuth/PodSleuth/Device.cs
@@ -25,6 +25,7 @@ namespace PodSleuth
         private List<ImageFormat> image_formats = new List<ImageFormat>();
         private bool photos_supported = false;
         private bool album_art_supported = false;
+        private bool sparse_album_art_supported = false;
         private bool chapter_images_supported = false;
         private bool is_shuffle = false;
         
@@ -157,6 +158,10 @@ namespace PodSleuth
             if(ReadPlistBool("vCardsSupported")) {
                 capabilities |= DeviceCapabilities.VCard;
             }
+
+            if(ReadPlistBool("SupportsSparseArtwork")) {
+                sparse_album_art_supported = true;
+            }
             
             if(plist_dict.ContainsKey("VisibleBuildID")) {
                 firmware_version = ((PlistString)plist_dict["VisibleBuildID"]).Value;
@@ -325,6 +330,10 @@ namespace PodSleuth
         public bool AlbumArtSupported {
             get { return album_art_supported; }
         }
+
+        public bool SparseAlbumArtSupported {
+            get { return sparse_album_art_supported; }
+        }
         
         public bool ChapterImagesSupported {
             get { return chapter_images_supported; }



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