[rygel] core: Fix album art spec for banshee



commit 876cc2f16cd297b24126d541de7765e6311e8679
Author: Jens Georg <mail jensge org>
Date:   Wed Jul 14 18:34:15 2010 +0300

    core: Fix album art spec for banshee
    
    Two problems:
     - File suffix is .jpg not .jpeg
     - Parts are not put to lower-case

 src/rygel/rygel-media-art-store.vala |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/src/rygel/rygel-media-art-store.vala b/src/rygel/rygel-media-art-store.vala
index bb5e322..8b61843 100644
--- a/src/rygel/rygel-media-art-store.vala
+++ b/src/rygel/rygel-media-art-store.vala
@@ -99,13 +99,15 @@ public class Rygel.MediaArtStore : GLib.Object {
                                     MediaItem item,
                                     bool      simple = false) {
         string hash;
+        string suffix = "jpeg";
 
         if (simple) {
             hash = get_simple_hash (type, item);
+            suffix = "jpg";
         } else {
             hash = get_hash (type, item);
         }
-        var file_path = "%s-%s.jpeg".printf (type, hash);
+        var file_path = "%s-%s.%s".printf (type, hash, suffix);
 
         var path = Path.build_filename (this.directory, file_path);
 
@@ -119,12 +121,12 @@ public class Rygel.MediaArtStore : GLib.Object {
                 normalized = input;
             } else {
                 normalized = albumart_strip_invalid_entities (input);
+                normalized = normalized.down ();
             }
             normalized = normalized.normalize (-1, NormalizeMode.ALL);
         }
 
-        return Checksum.compute_for_string (ChecksumType.MD5,
-                                            normalized.down ());
+        return Checksum.compute_for_string (ChecksumType.MD5, normalized);
     }
 
     private string get_simple_hash (string type, MediaItem item) {



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