[rygel] lms: Do not skip files with absent mimetypes



commit f883f092da23cb69f5b78ab365d8ce377fe72e6e
Author: Alexander Kanavin <alex kanavin gmail com>
Date:   Mon Mar 10 20:05:12 2014 +0200

    lms: Do not skip files with absent mimetypes

 src/plugins/lms/rygel-lms-album.vala      |    3 +--
 src/plugins/lms/rygel-lms-all-images.vala |    3 +--
 src/plugins/lms/rygel-lms-all-music.vala  |    3 +--
 src/plugins/lms/rygel-lms-all-videos.vala |    6 +++---
 src/plugins/lms/rygel-lms-image-year.vala |    3 +--
 5 files changed, 7 insertions(+), 11 deletions(-)
---
diff --git a/src/plugins/lms/rygel-lms-album.vala b/src/plugins/lms/rygel-lms-album.vala
index 25bfc0f..8bba210 100644
--- a/src/plugins/lms/rygel-lms-album.vala
+++ b/src/plugins/lms/rygel-lms-album.vala
@@ -72,10 +72,9 @@ public class Rygel.LMS.Album : Rygel.LMS.CategoryContainer {
 
         if (mime_type == null || mime_type.length == 0) {
             /* TODO is this correct? */
-            debug ("Skipping music item %d (%s) with no MIME type",
+            debug ("Music item %d (%s) has no MIME type",
                    id,
                    path);
-            return null;
         }
 
         var title = statement.column_text(3);
diff --git a/src/plugins/lms/rygel-lms-all-images.vala b/src/plugins/lms/rygel-lms-all-images.vala
index 875889b..d6f2624 100644
--- a/src/plugins/lms/rygel-lms-all-images.vala
+++ b/src/plugins/lms/rygel-lms-all-images.vala
@@ -47,10 +47,9 @@ public class Rygel.LMS.AllImages : Rygel.LMS.CategoryContainer {
 
         if (mime_type == null || mime_type.length == 0){
             /* TODO is this correct? */
-            debug ("Skipping music item %d (%s) with no MIME type",
+            debug ("Image item %d (%s) has no MIME type",
                    id,
                    path);
-            return null;
         }
 
         var title = statement.column_text(1);
diff --git a/src/plugins/lms/rygel-lms-all-music.vala b/src/plugins/lms/rygel-lms-all-music.vala
index c602755..a8de449 100644
--- a/src/plugins/lms/rygel-lms-all-music.vala
+++ b/src/plugins/lms/rygel-lms-all-music.vala
@@ -85,10 +85,9 @@ public class Rygel.LMS.AllMusic : Rygel.LMS.CategoryContainer {
 
         if (mime_type == null || mime_type.length == 0) {
             /* TODO is this correct? */
-            debug ("Skipping music item %d (%s) with no MIME type",
+            debug ("Music item %d (%s) has no MIME type",
                    id,
                    path);
-            return null;
         }
 
         var title = statement.column_text(3);
diff --git a/src/plugins/lms/rygel-lms-all-videos.vala b/src/plugins/lms/rygel-lms-all-videos.vala
index e1c021c..33cb649 100644
--- a/src/plugins/lms/rygel-lms-all-videos.vala
+++ b/src/plugins/lms/rygel-lms-all-videos.vala
@@ -49,20 +49,20 @@ public class Rygel.LMS.AllVideos : Rygel.LMS.CategoryContainer {
         /* TODO: Temporary code to extract the MIME TYPE.  LMS does not seem
            to compute the mime type of videos.  Don't know why. */
 
-        if (mime_type == null || mime_type.length == 0) {
+/*        if (mime_type == null || mime_type.length == 0) {
             try {
                 FileInfo info = file.query_info(FileAttribute.STANDARD_CONTENT_TYPE,
                                                 FileQueryInfoFlags.NONE, null);
                 mime_type = info.get_content_type();
             } catch {}
         }
+*/
 
         if (mime_type == null || mime_type.length == 0) {
             /* TODO is this correct? */
-            debug ("Skipping music item %d (%s) with no MIME type",
+            debug ("Video item %d (%s) has no MIME type",
                    id,
                    path);
-            return null;
             }
 
         var title = statement.column_text(1);
diff --git a/src/plugins/lms/rygel-lms-image-year.vala b/src/plugins/lms/rygel-lms-image-year.vala
index 1c32b71..baa0f76 100644
--- a/src/plugins/lms/rygel-lms-image-year.vala
+++ b/src/plugins/lms/rygel-lms-image-year.vala
@@ -47,10 +47,9 @@ public class Rygel.LMS.ImageYear : Rygel.LMS.CategoryContainer {
 
         if (mime_type == null || mime_type.length == 0){
             /* TODO is this correct? */
-            debug ("Skipping music item %d (%s) with no MIME type",
+            debug ("Image item %d (%s) has no MIME type",
                    id,
                    path);
-            return null;
         }
 
         var title = statement.column_text(1);


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