[rygel] media-export: Handle text/plain
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel] media-export: Handle text/plain
- Date: Tue, 4 Dec 2012 12:45:31 +0000 (UTC)
commit f864537c3963455a77156d6f9656216eafcdb364
Author: Jens Georg <jensg openismus com>
Date: Mon Dec 3 20:17:44 2012 +0100
media-export: Handle text/plain
DIDL_S playlists don't need to start with <?xml, so if a client does not
upload a playlist file with a .xml extenstion, shared-mime-info maps this to
text/plain, so we try those as well.
https://bugzilla.gnome.org/show_bug.cgi?id=689517
.../media-export/rygel-media-export-harvester.vala | 3 ++-
.../rygel-media-export-harvesting-task.vala | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/plugins/media-export/rygel-media-export-harvester.vala b/src/plugins/media-export/rygel-media-export-harvester.vala
index cc82a56..497cf46 100644
--- a/src/plugins/media-export/rygel-media-export-harvester.vala
+++ b/src/plugins/media-export/rygel-media-export-harvester.vala
@@ -158,7 +158,8 @@ internal class Rygel.MediaExport.Harvester : GLib.Object {
info.get_content_type ().has_prefix ("audio/") ||
info.get_content_type () == "application/ogg" ||
info.get_content_type () == "application/xml" ||
- info.get_content_type () == "text/xml") {
+ info.get_content_type () == "text/xml" ||
+ info.get_content_type () == "text/plain") {
string id;
try {
MediaContainer parent_container = null;
diff --git a/src/plugins/media-export/rygel-media-export-harvesting-task.vala b/src/plugins/media-export/rygel-media-export-harvesting-task.vala
index d4c6826..3185dd8 100644
--- a/src/plugins/media-export/rygel-media-export-harvesting-task.vala
+++ b/src/plugins/media-export/rygel-media-export-harvesting-task.vala
@@ -189,7 +189,8 @@ public class Rygel.MediaExport.HarvestingTask : Rygel.StateMachine,
info.get_content_type ().has_prefix ("audio/") ||
info.get_content_type () == "application/ogg" ||
info.get_content_type () == "application/xml" ||
- info.get_content_type () == "text/xml") {
+ info.get_content_type () == "text/xml" ||
+ info.get_content_type () == "text/plain") {
return this.push_if_changed_or_unknown (file, info);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]