[totem-pl-parser] lib: Make RSS feeds ending in "/" be parseable
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem-pl-parser] lib: Make RSS feeds ending in "/" be parseable
- Date: Thu, 26 Jul 2012 22:15:46 +0000 (UTC)
commit 951e1fd908294477827629855c63302891d9d56d
Author: Bastien Nocera <hadess hadess net>
Date: Thu Jul 26 23:15:02 2012 +0100
lib: Make RSS feeds ending in "/" be parseable
They're not directories, we don't know how to handle directories
on HTTP, so don't be silly.
plparse/totem-pl-parser.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/plparse/totem-pl-parser.c b/plparse/totem-pl-parser.c
index 14b8b25..e0a4929 100644
--- a/plparse/totem-pl-parser.c
+++ b/plparse/totem-pl-parser.c
@@ -1833,6 +1833,11 @@ totem_pl_parser_parse_internal (TotemPlParser *parser,
mimetype = g_strdup ("video/mp2t");
}
+ /* Not a directory on http though */
+ if (g_strcmp0 (mimetype, "inode/directory") == 0 &&
+ g_file_has_uri_scheme (file, "http"))
+ g_clear_pointer (&mimetype, g_free);
+
DEBUG(file, g_print ("_get_mime_type_for_name for '%s' returned '%s'\n", uri, mimetype));
if (mimetype == NULL || strcmp (UNKNOWN_TYPE, mimetype) == 0
|| (g_file_is_native (file) && g_content_type_is_a (mimetype, "text/plain") != FALSE)) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]