[totem] Simplify unsupported schemes avoidance in chapters



commit 197c94380a892bc9de9362613fb48a90c47b6d82
Author: Bastien Nocera <hadess hadess net>
Date:   Sat Sep 4 01:28:54 2010 +0100

    Simplify unsupported schemes avoidance in chapters

 src/plugins/chapters/totem-chapters.c    |    4 +---
 src/plugins/chapters/totem-cmml-parser.c |    3 ++-
 2 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/src/plugins/chapters/totem-chapters.c b/src/plugins/chapters/totem-chapters.c
index b128992..e18dda9 100644
--- a/src/plugins/chapters/totem-chapters.c
+++ b/src/plugins/chapters/totem-chapters.c
@@ -399,9 +399,7 @@ totem_file_opened_async_cb (TotemObject			*totem,
 	g_return_if_fail (TOTEM_IS_CHAPTERS_PLUGIN (plugin));
 	g_return_if_fail (uri != NULL);
 
-	if (g_str_has_prefix (uri, "http") != FALSE ||
-	    g_str_has_prefix (uri, "rtsp") != FALSE ||
-	    g_str_has_prefix (uri, "rtmp") != FALSE)
+	if (g_str_has_prefix (uri, "http") != FALSE)
 		return;
 
 	cmml_file = totem_change_file_extension (uri, "cmml");
diff --git a/src/plugins/chapters/totem-cmml-parser.c b/src/plugins/chapters/totem-cmml-parser.c
index d8eea27..2925928 100644
--- a/src/plugins/chapters/totem-cmml-parser.c
+++ b/src/plugins/chapters/totem-cmml-parser.c
@@ -536,7 +536,8 @@ totem_cmml_read_file_result (GObject		*source_object,
 
 	if (G_UNLIKELY (error != NULL)) {
 		g_warning ("chapters: failed to load CMML file %s: %s", data->file, error->message);
-		if (g_error_matches (error, g_io_error_quark(), G_IO_ERROR_NOT_FOUND)) {
+		if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND) ||
+		    g_error_matches (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED)) {
 			/* it's ok if file doesn't exist */
 			data->successful = TRUE;
 			data->is_exists = FALSE;



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