lms plugin: do not skip files with absent mimetypes
authorAlexander Kanavin <alex.kanavin@gmail.com>
Mon, 10 Mar 2014 18:05:12 +0000 (20:05 +0200)
committerAlexander Kanavin <alex.kanavin@gmail.com>
Tue, 25 Mar 2014 14:30:07 +0000 (16:30 +0200)
src/plugins/lms/rygel-lms-album.vala
src/plugins/lms/rygel-lms-all-images.vala
src/plugins/lms/rygel-lms-all-music.vala
src/plugins/lms/rygel-lms-all-videos.vala
src/plugins/lms/rygel-lms-image-year.vala

index aad7b78..7898fa7 100644 (file)
@@ -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);
index 875889b..d6f2624 100644 (file)
@@ -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);
index f856a92..60b202f 100644 (file)
@@ -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);
index e1c021c..33cb649 100644 (file)
@@ -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);
index 1c32b71..baa0f76 100644 (file)
@@ -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);