From 034c296ee8eccf3a2fd961d8e077393b52a5761a Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Mon, 10 Mar 2014 20:05:12 +0200 Subject: [PATCH] lms plugin: 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 aad7b78..7898fa7 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 f856a92..60b202f 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); -- 2.7.4